url:
<img th:src="@{/static/img/1.png}"/> <!--静态资源-->
<img th:src="@{/images/getImageById(imgId=${entity.imgId})}"/> <!--动态资源带参数-->
if:
<input th:if"${entity.isA} and ${entity.isB}"/> <!--代替 && -->
value,text:
<input th:value="entity.id" /> <p th:text="entity.name"></p>
将'\r\n';' '转化为'<br/>';' '
<span th:utext="${#strings.replace(#strings.escapeXml(#string.replace(#strings.escapeXml(entity.information),' ',' ')),
T(java.lang.System).getProperty('line.separator'),'<br/>')}"></span>
include
需要注意一个公用页面只定义一个公用fragment,多个相同元素会覆盖。