Pergunta

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?

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top