SPRING MVC 工程,配置sessionFactory出错,无法解析hibernate.cfg.xml 15
hibernate.cfg.xml,由eclipse的hibernate自动生成,不应该会出错才对?<!DOCTYPEhibernate-configurationPUB...
hibernate.cfg.xml,由eclipse的hibernate自动生成,不应该会出错才对?
<!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 name="orcl">
<property name="hibernate.bytecode.use_reflection_optimizer">false</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.password">SA</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@IP:1521:orcl</property>
<property name="hibernate.connection.username">WX</property>
<property name="hibernate.default_schema">WX</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.search.autoregister_listeners">false</property>
<!-- <mapping resource="com/nko/wechatplatform/pojo/WxmCustomer.hbm.xml" />
<mapping resource="com/nko/wechatplatform/pojo/WxmPermission.hbm.xml" /> -->
<mapping resource="com/nko/wechatplatform/pojo/WxmGroup.hbm.xml" />
<mapping resource="com/nko/wechatplatform/pojo/WxmHisMsg.hbm.xml" />
<mapping resource="com/nko/wechatplatform/pojo/WxmSysdefineMsg.hbm.xml" />
</session-factory>
</hibernate-configuration>
applicationcontext.xml
<bea id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<pro name="driver" value=".....Driver" />
<pro name="driverUrl" value="jdbc:ora..." />
<pro name="user" value="WX" />
<pro name="password" value="SA" />
<pro name="alias" value="orcl" />
</>
<bea id="sessionFactory" class=".......AnnotationSessionFactoryBean">
<pro name="dataSource" ref="dataSource" />
<pro name="configLocation" value="classpath:hibernate.cfg.xml" />
</> 展开
<!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 name="orcl">
<property name="hibernate.bytecode.use_reflection_optimizer">false</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.password">SA</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@IP:1521:orcl</property>
<property name="hibernate.connection.username">WX</property>
<property name="hibernate.default_schema">WX</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.search.autoregister_listeners">false</property>
<!-- <mapping resource="com/nko/wechatplatform/pojo/WxmCustomer.hbm.xml" />
<mapping resource="com/nko/wechatplatform/pojo/WxmPermission.hbm.xml" /> -->
<mapping resource="com/nko/wechatplatform/pojo/WxmGroup.hbm.xml" />
<mapping resource="com/nko/wechatplatform/pojo/WxmHisMsg.hbm.xml" />
<mapping resource="com/nko/wechatplatform/pojo/WxmSysdefineMsg.hbm.xml" />
</session-factory>
</hibernate-configuration>
applicationcontext.xml
<bea id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
<pro name="driver" value=".....Driver" />
<pro name="driverUrl" value="jdbc:ora..." />
<pro name="user" value="WX" />
<pro name="password" value="SA" />
<pro name="alias" value="orcl" />
</>
<bea id="sessionFactory" class=".......AnnotationSessionFactoryBean">
<pro name="dataSource" ref="dataSource" />
<pro name="configLocation" value="classpath:hibernate.cfg.xml" />
</> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询