错误调试记录2
来源:互联网 发布:mac怎么用sai 编辑:程序博客网 时间:2024/04/28 05:59
bean 1
<bean id="rebateInBo" class="com.shunwang.swpay.rebate.bo.imp.RebateInBoImp" >
<property name="dao">
<ref bean="rebateInDao"/>
</property>
<property name="rebateOutBo">
<ref bean="rebateOutBo"/>
</property>
<property name="bussPartnerBo">
<ref bean="bussPartnerBo"/>
</property>
</bean>
bean 2
<bean id="rebateOutBo" class="com.shunwang.swpay.rebate.bo.imp.RebateOutBoImp">
<property name="dao">
<ref bean="rebateOutDao"/>
</property>
<property name="rebateInBo">
<ref bean="rebateInBo"/>
</property>
</bean>
启动异常:
[ERROR]2011-03-11 14:53:29,687 MESSAGE : Context initialization failed
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'rebateInBo': Bean with name 'rebateInBo' has been injected into other beans [rebateOutBo] in its raw version as part of a circular reference, but has eventually been wrapped (for example as part of auto-proxy creation). This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:431)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
解决方法:
lazy-init="true" 加到一个bean的属性里就好了,如下:
<bean id="rebateInBo" class="com.shunwang.swpay.rebate.bo.imp.RebateInBoImp" lazy-init="true">
<property name="dao">
<ref bean="rebateInDao"/>
</property>
<property name="rebateOutBo">
<ref bean="rebateOutBo"/>
</property>
<property name="bussPartnerBo">
<ref bean="bussPartnerBo"/>
</property>
</bean>
- 错误调试记录2
- 调试错误记录
- 程序调试错误记录
- 记录每次调试的错误
- hbase错误调试过程记录
- mysql 存储过程错误调试记录
- windows下调试软件错误记录
- Ubuntu14.04 运行程序错误,调试记录
- c++中几个段错误调试记录
- CATVehicle 调试过程中错误记录
- 错误记录1----dom4j解析xml调试编码错误
- 实战记录:从EclipseLink迁移到Hibernate上(2)调试错误
- Struts 2 错误记录
- VS2010之各种编译器调试错误自我记录
- Sphinx语音识别学习记录 (五)-错误调试
- 调试Opal 3.12.8中出现的错误记录
- 调试中遇见的错误记录--逐步增加
- MySQL存储函数错误[Err] 1064的调试记录
- 20个数据库设计最佳实践
- web.xml error-page 不起作用解决方案
- NGINX 配置404错误页面转向
- 《Microsoft .NET企业级应用架构设计》读书笔记
- MyEclipse下远程调试liunx下的代码
- 错误调试记录2
- confirm
- c/c++编译时,指定程序运行时查找的动态链接库路径
- spring 和 struts 整合的三种方式
- fat.jar在MyEclipse中的使用
- myeclipse 中文
- js获取浏览器 尺寸信息
- freemarker内置函数及用法
- eclipse/myeclipse注释模板的修改 (转)