hibernate.cfg.xml主要配置什么内容?

时间:495次浏览2019.06.23提问

hibernate.cfg.xml主要配置什么内容?

已解决问题

hao231知道平台可亲可爱的光来之前网友在495次浏览2019.06.23提问提了关于IT技术编程Java相关的问题,他的提问有了解hibernate.cfg.xml主要配置什么内容?IT技术编程Java希望大家能够帮助她。

详细问题描述及疑问:期待您的答案,谢谢你帮我,祝你快乐,愿你事事如意 !

第1个回答

Monster2019.06.24回答<xmlversion="1.0"encoding="UTF-8"><!DOCTYPEhibernate-configurationPUBLIC"-//Hibernate/HibernateConfigurationDTD3.0//EN""http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><hibernate-configuration><session-factory><!--数据库连接--><propertyname="connection.driver_class">oracle.jdbc.OracleDriver</property><propertyname="connection.url">jdbc:oracle:thin:@localhost:1521:jbit</property><propertyname="connection.username">root</property><propertyname="connection.password">root</property><!--辅助参数--><propertyname="dialect">org.hibernate.dialect.Oracle10gDialect</property><propertyname="show_sql">true</property><propertyname="format_sql">true</property><propertyname="current_session_context_class">thread</property><!--映射信息--><mappingresource="po/User.hbm.xml"/><!--<mappingresource="po/House.hbm.xml"/><mappingresource="po/Street.hbm.xml"/>--></session-factory></hibernate-configuration>