You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Servlet filters can be configured in the `web.xml` configuration file or using Servlet annotations.
15
-
If you are using Spring Boot, you can
16
-
{spring-boot-docs}/how-to/webserver.html#howto.webserver.add-servlet-filter-listener.spring-bean[declare them as beans and configure them as part of your application].
17
+
There are also base class implementations for use in Spring applications:
18
+
19
+
* `GenericFilterBean` -- base class for a `Filter` configured as a Spring bean;
20
+
integrates with the Spring `ApplicationContext` lifecycle.
21
+
* `OncePerRequestFilter` -- extension of `GenericFilterBean` that supports a single
22
+
invocation at the start of a request, i.e. during the `REQUEST` dispatch phase, and
23
+
ignoring further handling via `FORWARD` dispatches. The filter also provides control
24
+
over whether the `Filter` gets involved in `ASYNC` and `ERROR` dispatches.
25
+
26
+
Servlet filters can be configured in `web.xml` or via Servlet annotations.
27
+
In a Spring Boot application , you can
28
+
{spring-boot-docs}/how-to/webserver.html#howto.webserver.add-servlet-filter-listener.spring-bean[declare Filter's as beans]
0 commit comments