Hibernate学习笔记---Hibernate.cfg.xml的建立

xml 代码
 
  1. xml version="1.0" encoding="utf-8"?>  
  2.     PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"   
  3.     "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">  
  4.   
  5. <hibernate-configuration>  
  6.     <session-factory>  
  7.         <!---->  
  8.         <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1/hibernate<!---->property>  
  9.         <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver<!---->property>  
  10.         <property name="hibernate.connection.username">root<!---->property>  
  11.         <property name="hibernate.connection.password">tiger<!---->property>  
  12.         <property name="dialect">org.hibernate.dialect.MySQLDialect<!---->property>  
  13.            
  14.         <property name="hibernate.show_sql">true<!---->property>  
  15.            
  16.         <mapping resource="com/bjsxt/hibernate/one2many/One2Many.hbm.xml"/>  
  17.     <!---->session-factory>  
  18. <!---->hibernate-configuration>  

你可能感兴趣的:(sql,xml,Hibernate,mysql,jdbc)