I'm using Spring Boot in a web project, and I wanted to use the static content cache feature.
Using the ContentVersionStrategy with the following configuration in application.properties
spring.resources.chain.enabled=true
spring.resources.chain.cache=true
spring.resources.chain.strategy.content.enabled=true
spring.resources.chain.strategy.content.paths=/**
And the resources like this in a Thymeleaf html
<script src="@{/js/app.js}"></script>
I get the MD5 hash appened to the filename, but if I make a change to that file, the content changes but the hash is still the same.
The only way to make hash "reload" on every request if the file content changes is setting:
spring.resources.chain.cache=false
But I think that miss the point of using this Spring feature. Is this a normal behaviour?