Skip to content
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

WebMvcMetricsFilter not created after upgrading to Spring Boot 2.7.0 when another user created bean of type FilterRegistrationBean is available #31451

Closed
dariosanna opened this issue Jun 18, 2022 · 3 comments
Labels
status: duplicate A duplicate of another issue

Comments

@dariosanna
Copy link

After upgrading from Spring Boot 2.6.8 to 2.7.0 WebMvcMetricsAutoConfiguration does not create a WebMvcMetricsFilter bean when a user created FilterRegistrationBean is available, regardless of what type of the filter bean.

In Spring Boot 2.7.0 the FilterRegistrationBean has ConditionalOnMissingBean , whereas Spring Boot 2.6.8 allways creates the bean:

Spring Boot 2.7.0 WebMvcMetricsAutoConfiguration:

@ConditionalOnMissingBean
public FilterRegistrationBean<WebMvcMetricsFilter>

It seems that ConditionalOnMisstingBean ignores the type parameter T when evaluating the condition.

Is that a bug or how to make @ConditionalOnMissingBean respects the type parameter T ?

Best regards.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 18, 2022
@izeye
Copy link
Contributor

izeye commented Jun 18, 2022

This seems to be a duplicate of #31150.

@wilkinsona
Copy link
Member

Indeed it is, @izeye. Thanks.

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 18, 2022
@dariosanna
Copy link
Author

OK thank you

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants