Springboot-thymeleaf简单使用
thymeleaf模板引擎: th: ...
简单表达式:
1.变量---使用 ${...}取值
2.选择表达式---使用 *{...}
3.消息----使用 #{...}
4.地址----使用 @{...}
遍历:th:each
<h3 th:each="user:${users}" th:text="${user}"></h3>
从users遍历每一个user在取出user
thymeleaf模板引擎: th: ...
简单表达式:
1.变量---使用 ${...}取值
2.选择表达式---使用 *{...}
3.消息----使用 #{...}
4.地址----使用 @{...}
遍历:th:each
<h3 th:each="user:${users}" th:text="${user}"></h3>
从users遍历每一个user在取出user