Equivalent of org.springframework.boot.context.embedded.FilterRegistrationBean for non-Boot Spring project?
servlet-filters, spring, spring-bean, spring-mvc, spring-session
Solution
Depending on your container configuration, web.xml or `ServletContainerInitializer`, you can register a `DelegatingFilterProxy` filter and make it refer, by name, to a `Filter` bean you've declared in your `ApplicationContext`.
Problem
I'm trying to implement external session handling in Spring, as per this tutorial. I'm having some trouble adding the right filter though. Spring Boot appears to have defined the proper bean/filter, but my project is not Spring Boot, so it cannot find the `FilterRegistrationBean`. Is there some sort of equivalent to this class in non-Boot versions of Spring? I also tried org.springframework.web.context.embedded.FilterRegistrationBean, but can't get it to import properly (it looks like this documentation refers to a SNAPSHOT version, so perhaps this package was never part of a proper release).