Hibernate 异常提示_1

时间:2021-08-22 06:12:24

INFO: HHH000041: Configured SessionFactory: null
九月 15, 2016 12:29:35 上午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!)

----- 未正确配置 hibernate配置文件--------
参考:
<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/hibernatedemo1</property>
<!--数据库用户名和密码-->
<property name="hibernate.connection.password">root</property>
<property name="hibernate.connection.username">root</property>

<property name="hibernate.format_sql">true</property>
<property name="show_sql">true</property>

<property name="hibernate.hbm2ddl.auto">update</property>
<!--关联hbm配置文件-->
<mapping resource="com/watchfree/Model/Course.hbm.xml"/>
<mapping resource="com/watchfree/Model/Student.hbm.xml"/>
</session-factory>
</hibernate-configuration>

相关文章