1、springboot配置application.yaml中加入
#启用内容版本策略 md5
spring.resources.chain.strategy.content.enabled: true
#应用于版本策略的模式的逗号分隔列表 默认/**
spring.resources.chain.strategy.content.paths: /js/web/**
2、在页面中引入
<script th:src="@{/js/web/common.js}"></script>
<script th:src="@{/js/web/logstate.js}"></script>
3、将js文件放入配置的paths中去