We have existing couple of Spring applications which extends SpringBootServletInitializer and define their own filters. We want to combine these 2 Spring applications (without making any changes in it), for which we implemented Spring boot application which extends SpringBootServletInitializer. As part of configurations, we are creating separate AnnotationConfigServletWebServerApplicationContext and DispatcherServlet for underlying applications, but they share ServletContext.
As ServletContext is getting shared among these apps, all filters from are trying to get registered against same ServletContext and some are not getting registered as their name match (though their definition differs). We have different authentications in of SpringSecurityFilterChain configured for underlying application, but as only one "SpringSecurityFilterChain" is allowed to register in ServletContext, it's getting registered with filters from first app and it's not registering for second app..
Is there anyway with which we can possibly override/update FilterRegistrationBeans once they are registered in ServletContext? Any other alternative to suggestion above issue?
Comment From: scottfrederick
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.