hibernate.cfg.xml配置,标签顺序没错,可是提示就说它错了
<?xmlversion="1.0"encoding="UTF-8"?><!--配置文件的DTD信息--><!DOCTYPEhibernate-configuration...
<?xml version="1.0" encoding="UTF-8"?>
<!-- 配置文件的DTD信息 -->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hi</property>
<property name="connection.username">root</property>
<property name="connection.password">945319791</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="current_session_context_class">thread</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">update</property>
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="c3p0.max_size">30</property>
<property name="c3p0.min_size">10</property>
<property name="c3p0.timeout">500</property>
<property name="c3p0.max_statements">100</property>
<mapping resource="com/sammy/lab/Person.hbm.xml"/>
</session-factory>
</hibernate-configuration> 展开
<!-- 配置文件的DTD信息 -->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hi</property>
<property name="connection.username">root</property>
<property name="connection.password">945319791</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="current_session_context_class">thread</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">update</property>
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="c3p0.max_size">30</property>
<property name="c3p0.min_size">10</property>
<property name="c3p0.timeout">500</property>
<property name="c3p0.max_statements">100</property>
<mapping resource="com/sammy/lab/Person.hbm.xml"/>
</session-factory>
</hibernate-configuration> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询