Spring boot打成jar包后,th:replace报错的问题 错误写法: <head th:replace="~{/commons/commons::headcommon}"> 正确写法: <head th:replace="commons/commons::headcommon"> 总结: 不要用 ~{…}最前面不要写 / 参考:https://www.shuzhiduo.com/A/QV5Zg9N6dy/