Hibernate.cfg.xml配置文件解析

<hibernate-configuration>

    <session-factory>
  <!-- 关于连接数据库的username和url -->
  <property name= "connection.username">hibernate</property>
  <property name= "connection.url">
      jdbc:mysql: //localhost:3306/testdb
  </property>
  
  <!-- 采用的数据库的语调或者说语法格式 -->
  <property name= "dialect">
      org.hibernate.dialect.MySQLDialect
  </property>
  <!-- DB Driver's 名字 -->
  <property name= "myeclipse.connection.profile">
      mysqldriver
  </property>
  
  <!-- 数据库连接的密码及驱动类 -->
  <property name= "connection.password">123456</property>
  <property name= "connection.driver_class">
      com.mysql.jdbc.Driver
  </property>
  
  <!-- 执行过程中显示hibernate的sql语句 -->
  <property name= "show_sql"> true</property>
  
  <!-- Specify location of Hibernate mapping files -->
  <mapping resource= "cn/xhu/wy/hibernate/demo01/Person.hbm.xml" />

    </session-factory>

</hibernate-configuration>

你可能感兴趣的:(Hibernate,xml,职场,配置文件,休闲)