模板布局
- th:include 加载指定文件内容(Thymeleaf 3.0 之后不再推荐使⽤ th:include.),例如
<div th:include="/common/select::server"></div>
加载common目录下select(.html, 因为项目里配了匹配后缀,这里不需要加)的 server 部分,server部分是啥嘞?
<div th:fragment="server1">是这个</div>
- th:fragment: 定义片段名字,让别的地方引用
另外:Thymeleaf 模板布局 th:fragment、th:replace、th:insert、th:remove, 很不错,大佬提供了很多例子
待更新……