thymeleaf
西北King
逆流而上。
展开
-
thymeleaf th:if else
在html里面 if else 是由switch来完成的案例:role角色是int 类型,存放的是 0 和 10:代表没角色=普通用户1:代表超级管理员这里我用th:each遍历数据库th:switch=0的话 th:text显示普通用户th:switch=1的话 th:text显示超级管理员...原创 2021-08-06 16:02:11 · 2609 阅读 · 0 评论 -
thymeleaf th:if 案例
th:if是 thymeleaf模板引擎里面的语句gt:great than(大于)>ge:great equal(大于等于)>=eq:equal(等于)==lt:less than(小于)<le:less equal(小于等于)<=ne:not equal(不等于)!=<tr th:each="user:${users}"><td th:if="${user.num} eq '123'" th:text="${user.username}"原创 2021-08-06 15:54:00 · 170 阅读 · 0 评论 -
html下拉列表传值
<select style="width: 222px ; text-align: center;text-align-last: center; font-size: 20px; height: 50px" ; id="role" class="role"> <option name="option" disabled="disabled" selected="selected" th:text="'==='+${update.role}+'==='" class="te.原创 2021-08-06 11:38:11 · 404 阅读 · 0 评论 -
修改thymeleaf默认路径
修改thymeleaf模板默认路径在我们使用thymeleaf模板时 我们访问html界面跳转时后缀默认是.jsp(我们可以改成后缀为.html)我们可以通过yml配置更改 #视图解析器 thymeleaf: prefix: classpath:/templates/ suffix: .html...原创 2021-04-22 17:45:23 · 889 阅读 · 0 评论