Closed
Description
Neale Upstone opened SPR-10464 and commented
I'd like the following code snippet to be able to work, but I cannot set alwaysMustRevalidate:
@Configuration
@EnableWebMvc
public class ResourcesServletConfig extends WebMvcConfigurerAdapter {
@Autowired
private ResourceVersionSource versionSource;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
String cachebustPaths = "/" + versionSource.getVersion() + "/**";
registry.addResourceHandler(cachebustPaths)
.addResourceLocations("/")
.setCachePeriod(365 * 24 * 3600)
.setMustRevalidate(false);
}
}
I would be good to have control over other properties of WebContentGenerator too, hence the +others in the summary.
Affects: 3.2.2
This issue is a sub-task of #16413
Referenced from: commits 38f32e3
9 votes, 13 watchers