Hibernate configuration properties
•
Java
<?xml version='1.0'encoding='UTF-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!--数据库驱动--> <property name="connection.driver_class">com.MysqL.jdbc.Driver</property> <!--数据库连接的URL--> <property name="connection.url">jdbc:MysqL://localhost:3306/test</property> <!--数据库连接用户名--> <property name="connection.username">root</property> <!--数据库连接密码--> <property name="connection.password">111</property> <!--Hibernate方言--> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <!--打印sql语句--> <property name="show_sql">true</property> <!--映射文件--> <mapping resource="com/lyq/User.hbm.xml"/> </session-factory> </hibernate-configuration>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码