Reputation: 1651
how can I disable caching of the static content?
I tried to put this in my applications.properties:
spring.cache.type=NONE
This is my config:
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry
.addResourceHandler("/**")
.addResourceLocations("classpath:/static/")
.resourceChain(true).addResolver(
new VersionResourceResolver().addContentVersionStrategy("/**"));
}
Still when I change something in the css file I have to reload the page with the developer console opened in order for it to show.
Thanks!
Upvotes: 1
Views: 343
Reputation: 57381
Move all the resources out of classpath. To replace something loaded to classpath you may need something complex like own class loader etc. Try to move to a separate folder all the resources you need to change.
Upvotes: 1