Hibernate 配置文件

<?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="dialec">org.hibernate.dialect.MySQLDialect</property>
		<!-- 打印SQL語句 -->
		<property name="show_sql">true</property>
		<!-- 映射文件 -->
		<mapping resource=""/>
	</session-factory>
</hibernate-configuration>
相關文章
相關標籤/搜索