referenced bean " " not found

lgbupt 2009-10-25 11:40:18
这是我在一个配置文件中做的配置,不过他老是提示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>


是什么地方错了,大家帮我。
...全文
362 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
kaka_2212 2011-06-17
  • 打赏
  • 举报
回复
You need to create a config-set containing the xml files which belong together. Then the references should be resolvable.

能不能说的具体点?
swandragon 2009-10-25
  • 打赏
  • 举报
回复
You need to create a config-set containing the xml files which belong together. Then the references should be resolvable.
suwanjun881011 2009-10-25
  • 打赏
  • 举报
回复
你在RegisterController注入了daoProxyFactory没有啊?
lgbupt 2009-10-25
  • 打赏
  • 举报
回复
在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>
lgbupt 2009-10-25
  • 打赏
  • 举报
回复
怎么建,麻烦说的具体一点,谢谢。我是新手。

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧