Jul 7th, 2006, 03:42 AM
how: elegant beans configuration
I am new to spring and have following problem...
The setup is very similar to servlet filters as I have one FooProcessor which would have to execute a linked list of FooFilter (defined as interface).
I would like to use spring for their assembly and configuration, hiding the FooProcessor bean configuration in one .xml and have a separate .xml for all FooFilter beans, so a user can add FooFilters...
1. idea was to have a property FooProcessor called 'filters' and to separately (in another .xml) config as a bean a list of FooFilter maybe using some <util:list> or <list>, but I haven't luck with that...
2. idea was to load with code filters .xml with 'factory.getBeansOfType' and manually setting the dependency in FooProcessor
Somebody can give me some examples of how to accomplish this...
Jul 7th, 2006, 07:18 AM
the idea of servlet-filters matches perferctly with the AOP's Interceptors or Advices, so that you can make your FooProcessor absolutely independent on FooFilters.
Read the AOP section in the docs, you'll get the main idea.