I have the following situation:
I set the beans (in applicationContext.xml) as follows:
...
<bean id="bDaoImpl" cl开发者_如何学Cass="BDaoImpl"></bean>
<bean id="injBInA" class="ADaoImpl">
<property name="b" ref="bDaoImpl"/>
</bean>
...
Why when I use "b" in the value of the Object class ADaoImpl is null?
I have the solution. Sorry. Basically when I load the bean from application context (ApplicationContext.getBean) does not load the bean with id = "injBInA" therefore right was never carried out the injection
精彩评论