Results 1 to 2 of 2

Thread: how: elegant beans configuration

  1. #1
    Join Date
    Sep 2005
    Location
    Milan, Italy
    Posts
    23

    Default 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...

  2. #2
    Join Date
    Dec 2005
    Posts
    269

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •