Code:public class A{ private B b; } public class B{ }When use new A() to create A, b is null.Code:<bean id="aBean" class="A"> <property name="b"> ??? </property> </bean>
How to create an instance of A with b = null when using context.getBean("aBean")?
In the bean definition, I have tried <property name="b"><null/></property>, but this don't work.


Reply With Quote