Thymeleaf 复杂语法
判断语句、循环语句、工具类使用等等
创建test.html
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<title th:text="${title}">语法测试</title>
</head>
<body>
<h3>#strings 工具类测试</h3>
<div th:if="${not #strings.isEmpty(testString)}">
<p>testString初始值 : <span th:text="${testString}" /></p>
<p>
toUpperCase : <span th:text="${#strings.toUpperCase(testString)}" />
</p>
<p>
toLowerCase : <span th:text="${#strings.toLowerCase(testString)}" />
</p>
<p>
equalsIgnoreCase :
<span th:text="${#strings.equalsIgnoreCase(testString, '13')}" />
</p>
<p>indexOf : <span th:text="${#strings.indexOf(testString, 'r')}" /></p>
<p>
substring : <span th:text=