Lazy setting of properties?
I just wondered if/how it might be possible to lazily set properties.
<bean id="A" class="test.A">
<bean id="B" class="test.B" lazy-init="true">
If A is retrieved from the bean factory, B will be instantiated as well.
Is it somehow possible to assign some kind of lazy proxy for the "foo" property which resolves an actual instance of B on first access?
I already thought of using TargetSource but didn't find a working solution yet.
Any help would be appreciated.