Hibernate配置檔案 - hibernate.cfg.xml
阿新 • • 發佈:2018-11-24
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>