记录一下今天使用th:include遇到的路径问题bug。
html目录结构:
backstage/common/common.html公共模块:
在backstage/user/list.html引用common.html公共页面模块:
错误示范:
由于springboot templates是直接从根目录开始访问的,所以不能直接走common文件夹,也不用自己用/回到根目录。
正确示范:

记录一下今天使用th:include遇到的路径问题bug。
html目录结构:
backstage/common/common.html公共模块:
在backstage/user/list.html引用common.html公共页面模块:
错误示范:
由于springboot templates是直接从根目录开始访问的,所以不能直接走common文件夹,也不用自己用/回到根目录。
正确示范: