Question

I have the following situation: enter image description here

I set the beans (in applicationContext.xml) as follows:

...
<bean id="bDaoImpl" class="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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top