版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/R812656252/article/details/83956633
hibernate.cfg.xml
13/11/2018 - TBC
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">123456</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/db_hibernate</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hbm2ddl.auto">create</property>
<mapping resource="com/java1234/hibernate/model/node.hbm.xml"/>
<mapping class="com.java1234.hibernate.model.Teacher"/>
</session-factory>
</hibernate-configuration>