- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Closed
Copy link
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: taskA general taskA general task
Milestone
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
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: taskA general taskA general task