I’ve registered my spring security xml file in the web.xml.
Now I have a different jar that would like to extend spring security and add his own filter chain.
This jar cannot extend the web.xml of course.
How do you recommend to do that?
Thanks in advance,
Shay
If your other jar is also using Spring then you should be able to inject the
FilterChainProxythat Spring Security uses into something in your other jar. It all depends on how your jars are assembled into an application (context).See the Spring Security reference and Javadoc for FilterChainProxy
FilterChainProxyprovidesgetFilterChainMapandsetFilterChainMap. It would seem possible to manipulate the chain through these methods, but I can’t confirm this having not tried it myself.