thymeleaf常用语法

转自:https://segmentfault.com/a/1190000017563310






代码复用;提取公共页面 th:insert或者th:replace:~{--::--}--页面下的--组件
th:fragment="sidebar"
th:replace="~{commons/commons::sidebar(传递的参数)}"commons文件夹下的commons.html中的sidebar组件,
如果要接收参数,可以直接使用()传参,接收判断即可

你可能感兴趣的:(thymeleaf常用语法)