这是我在一个配置文件中做的配置,不过他老是提示referenced bean "daoProxyFactory" not found<bean id="registerController" class="com.ypl.RegisterController">
<property name="dao">
<ref bean="daoProxyFactory" />
</property>
<property name="formView">
<value>register</value>
</property>
<property name="validator">
<bean class="com.ypl.ModifyMemberValidate" />
</property>
</bean>我刚学Java,不是很了解。在另一配置文件中有一个配置如下:<bean id="daoProxyFactory"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyTargetClass" value="true" />
<property name="target">
<ref local="dao" />
</property>
<property name="transactionManager">
<ref local="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
是什么地方错了,大家帮我。

解决方案 »

  1.   

    You need to create a config-set containing the xml files which belong together. Then the references should be resolvable.
      

  2.   

    在web.xml中的配置如下<init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    WEB-INF/config/dao-config.xml,
                            WEB-INF/config/view-config.xml,
                            WEB-INF/config/controller-config.xml,
                             WEB-INF/config/managerController-config.xml
    </param-value>
    </init-param>
      

  3.   

    你在RegisterController注入了daoProxyFactory没有啊?
      

  4.   

    You need to create a config-set containing the xml files which belong together. Then the references should be resolvable.能不能说的具体点?