How can I add a filter class in Spring Boot?

Is there any annotation for a Filter class (for web applications) in Spring Boot? Perhaps @Filter?

I want to add a custom filter in my project.

The Spring Boot Reference Guide mentioned about
FilterRegistrationBean, but I am not sure how to use it.

24 Answers
24

Leave a Comment