-
Notifications
You must be signed in to change notification settings - Fork 40.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create @ConditionalOnMissingServletFilter #7475
Comments
bclozel
added a commit
to bclozel/spring-boot
that referenced
this issue
Dec 15, 2016
This commit introduces a new Conditional annotation `@ConditionalOnMissingServletFilter` which checks for the absence of Servlet filters as beans or `FilterRegistrationBean`s. This Conditional annotation can be used to guard Servlet Filter bean definitions like: ``` @bean @ConditionalOnMissingServletFilter public MyServletFilter myServletFilter() { //... } ``` Fixes spring-projectsgh-7475
bclozel
added a commit
to bclozel/spring-boot
that referenced
this issue
Dec 15, 2016
This commit introduces a new Conditional annotation `@ConditionalOnMissingServletFilter` which checks for the absence of Servlet filters as beans or `FilterRegistrationBean`s. This Conditional annotation can be used to guard Servlet Filter bean definitions like: ``` @bean @ConditionalOnMissingServletFilter(MyServletFilter.class) public MyServletFilter myServletFilter() { //... } ``` Fixes spring-projectsgh-7475
Fixed in 44a46f1 but accidentally referenced the wrong issue number. |
@ConditionalOnMissingServletFilter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Conditional annotation should:
FilterRegistrationBean
that will register a Filter of a particular typeThis condition should improve the auto-configuration of Servlet Filters.
We could go for a shorter name
@ConditionalOnMissingFilter
, but this could clash with a future similar annotation for Spring Web ReactiveWebFilters
.The text was updated successfully, but these errors were encountered: