hibernate.cfg.xml配置信息

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wo3002807/article/details/11579693

1,hibernate.cfg.xml配置信息

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration SYSTEM  "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
   <session-factory>
   <!--数据库方言-->
   <property name="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </property>
   <!--连接数据库驱动-->
   <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
   <!--连接地址-->
   <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test </property>
   <!--用户名-->
   <property name="hibernate.connection.username"> root </property>
   <!--密码-->
   <property name="hibernate.connection.password"> ****** </property>
   <!--连接池-->
   <property name="connection.pool_size">2</property>
   <!--POJO类与数据库表的映射文件-->
   <mapping resource="#######.hbm.xml"/>
</session-factory>
</hibernate-configuration>

 

猜你喜欢

转载自blog.csdn.net/wo3002807/article/details/11579693