-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Resource Versioning Handler not being called if any FilterRegistrationBean is found #14897
Comments
Thanks for the detailed report and for the sample application. I'm still digging into the root cause, but it looks like the problem might be related to the In 2.0.5 running with debug reports:
in 2.0.6
|
Commits 64f04fc and 6cc272e changed |
@iamareebjamal Until we can fix this, you can work-around the issue by adding the following to your @Bean
public FilterRegistrationBean<ResourceUrlEncodingFilter> resourceUrlEncodingFilter() {
FilterRegistrationBean<ResourceUrlEncodingFilter> registration = new FilterRegistrationBean<>(new ResourceUrlEncodingFilter());
registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ERROR);
return registration;
} |
- Add workaround for issue spring-projects/spring-boot#14897
- Add workaround for issue spring-projects/spring-boot#14897
Should we reconsider #7475 ? |
It looks like it. An alternative would be to use a specific bean name when checking for a missing bean, but that feels more like a workaround than a long-term solution. |
For 2.0 we can rely on |
Issue:
If actuator starter dependency is included in the project, the resource strategies stop working, for instance, GZip or Content Versioning strategies are not called. Even AbstractResourceHandler stops getting invoked. Removing the actuator starter dependency makes the config start working again. This is reproducible on a simple https://start.spring.io template (with thymeleaf, web and actuator starters) as well. This also gets resolved on downgrading to 2.0.5. Sample repo is provided below
Sample Repo:
https://github.com/iamareebjamal/spring-boot-resource-versioning-bug
Environment:
Spring Boot 2.0.6
The text was updated successfully, but these errors were encountered: