Hibernate 配置hibernate.cfg.xml

"1.0" encoding="UTF-8"?>
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

    
    
        
        "hibernate.connection.driver_class">com.mysql.jdbc.Driver
        
        "hibernate.connection.url">jdbc:mysql://localhost:3306/database_name
        
        "hibernate.connection.username">username
        
        "hibernate.connection.password">password
        
        
        "hibernate.dialect">org.hibernate.dialect.MySQLDialect
        
        
        "hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider
        
        
        "hibernate.show_sql">true
        "hibernate.format_sql">true

      
         "hibernate.hbm2ddl.auto">validate
        
        
        "package.name.ClassName.hbm.xml" />

    

你可能感兴趣的:(数据库)