Spring配置文件的问题

Spring配置文件的问题

问题描述:

提示错误 :
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.lfw.sh.manager.impl.UserManagerImpl#10b4b2f' defined in class path resource [applicationContext-commom.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required
java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required

Spring配置文件如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

class="org.apache.commons.dbcp.BasicDataSource">
value="com.mysql.jdbc.Driver">




<bean id="sessionFactory"
    class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="dataSource">
        <ref bean="dataSource" />
    </property>
    <property name="hibernateProperties">
        <props>
            <prop key="hibernate.dialect">
                org.hibernate.dialect.MySQLDialect
            </prop>
            <prop key="hibernate.show_sql">
                true
            </prop>
        </props>
    </property>
    <property name="mappingResources">
        <list>
            <value>com/lfw/sh/domin/User.hbm.xml</value>
            </list>
    </property></bean>


<!--Hibernate TransactionManager-->
<bean id="transactionManager"
      class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory"/>
</bean>

<!--Base TransactionProxyed Service Bean-->
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true">

    <property name="transactionAttributes">
        <props>
            <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
            <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
            <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
            <prop key="save*">PROPAGATION_REQUIRED</prop>
            <prop key="update*">PROPAGATION_REQUIRED</prop>
            <prop key="updateBillSeq*">PROPAGATION_REQUIRED,ISOLATION_SERIALIZABLE</prop>
            <prop key="remove*">PROPAGATION_REQUIRED</prop>
            <prop key="submit*">PROPAGATION_REQUIRED</prop>
        </props>
    </property>
</bean>



 <bean id="userManager" parent="baseTxService">
    <property name="target">
        <bean class="com.lfw.sh.manager.impl.UserManagerImpl"  />
    </property>
    <property name="sessionFactory">
        <ref bean="sessionFactory"/>
    </property>
</bean>
</beans>

我明明已经注入了sessionFactory了呀,怎么还是提示找不到的?
[b]问题补充:[/b]
UserManagerImpl类已经继承了HibernateDaoSupport类

你的UserManagerImpl没有注入sessionFactory, [code="java"]






[/code]
改成:
[code="java"]







[/code]
试试

请问LZ
UserManagerImpl类是否继承了HibernateDaoSupport类啊