posted 11 years ago
Hi there everybody,
I have a list of Class types that I need to iterate over and for every type in that list, Spring needs to automatically find the correct sort of object to initialize.
For example : I have a ClassA and ClassB. When for example there is a type User, a ClassA needs to be initialized with certain parameters (which are defined in the context.xml). When for example there is a type of Message, it should also make an object from type ClassA but with different parameters, which are again defined in the context.xml.
How would I go about doing this? I have looked at the inversion of control feature of spring but cannot seem to find the correct implementation for my specific purpose
One idea was that I make a bean for every kind of possible type such as
Kind regards,
Merlijn