Springboot的thymeleaf使用
public static final String DEFAULT_PREFIX = "classpath:/templates/";
public static final String DEFAULT_SUFFIX = ".html";
thymeleaf的导包
<!--thymeleaf基于最新版开发 start-->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
</dependency>
<!--thymeleaf end-->
thymeleaf遍历集合
<h4 th:each="user:${users}" th:text="${user}"/>
<h4 th:each="user:${users}">[[ ${user} ]]</h4>