JAVA Hibernate5的基本配置

1.hibernate5的基础jar包

https://pan.baidu.com/s/10qolMgIPJw7HX_e6SEVk6g

2.hibernate.properties

 

hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://127.0.0.1:3306/Hib
hibernate.connection.username=root
hibernate.connection.password=qianqian1996

3.bean对象的配置文件

    2.1  命名方式 beanName.hbm.xml

    
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
   
   
   
   
   
   

   
   
   
   

   
   

4.hibernate.cfg.xml


    "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">


    
    
        org.hibernate.dialect.MySQL5Dialect
    


    
    
        org.hibernate.c3p0.internal.C3P0ConnectionProvider
    

    
    
        thread
    

   
    
    
        update
    

    
    
        true
    

    
    
        true
    


    
    






你可能感兴趣的:(JAVA Hibernate5的基本配置)