'Regenerate the js version in my application
In my springboot application I am using following settings in application.properties:
spring.web.resources.cache.cachecontrol.max-age=2592000
spring.web.resources.chain.strategy.content.enabled=true
spring.web.resources.chain.strategy.content.paths=/**
This generate the js in the html with versioning. For eg for the code:
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/popper.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
I can see in source code as:
<script src="/vgportal/js/jquery.min-dc5e7f18c8d36ac1d3d4753a87c98d0a.js"></script>
<script src="/vgportal/js/popper.min-710021214a23cf8a5a5841a648d65832.js"></script>
<script src="/vgportal/js/bootstrap.min-f0c2bcf5ef0c4476508d79ec9cdcce07.js"></script>
Since the cache age is written for 30 days, in all the environment i see the same versioning of the js (like bootstrap.min-f0c2bcf5ef0c4476508d79ec9cdcce07.js).
I am looking for a mechanism to reset the version of the js getting generated here.
Please advise
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
