我用myeclipse为工程添加了hibernate能力,又添加了spring能力,但是生成的applicationContext.xml报错

<?xml version="1.0" encoding="UTF-8"?>

<beans

xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:p="http://www.springframework.org/schema/p"

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd" xmlns:tx="http://www.springframework.org/schema/tx">



<bean id="sessionFactory"

class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">

<property name="configLocation"

value="classpath:hibernate.cfg.xml">

</property>

</bean>

<bean id="transactionManager"

class="org.springframework.orm.hibernate4.HibernateTransactionManager">

<property name="sessionFactory" ref="sessionFactory" />

</bean>

<tx:annotation-driven transaction-manager="transactionManager" /></beans>


提示org.springframework.orm.hibernate5.LocalSessionFactoryBean这句配置错误为:

The fully qualified name of the bean's class, except if it serves only as a parent definition for child 

 bean definitions.

怎么解决啊?

qq_莫非
浏览 1260回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java