springboot thymeleaf常用标签
xmlns:th="http://www.w3.org/1999/xhtml"
<tr th:each="user,i : ${list}" th:class="${i.odd}?'odd'">
<td th:text="${user.username}"></td>
<td th:if="${user.sex}==1">男</td>
<td th:if="${user.sex}==0">女</td>
<td th:text="${user.phone}"></td>
<td th:text="${#dates.format(user.borthday, 'yyyy-MM-dd')}"></td>
<td>
<input type="button" value="删除" th:onclick="'getName(\''+${user.id}+'\')'">
</td>
</tr>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<!--数字循环-->
<!-- <tr class="pagination" th:each="i : ${#numbers.sequence(1, rows)}">
<td>[[${i}]]</td>
</tr>-->
<!--嵌套循环-->
<tr class="pagination" th:each="i : ${#numbers.sequence(1, rows)}">
<td th:each="deptDict,userStat : ${deptDicts}"
th:if="${userStat.index lt i*4 and userStat.index ge (i-1)*4}">
<input type="checkbox" th:value="${deptDict.deptCode}" name="deptCode">
<span th:text="${deptDict.deptName}"></span>
</td>
</tr>
springboot thymeleaf常用标签的更多相关文章
- thymeleaf常用标签
1. th:checked ,th:selected标签<input type="radio" value="M" name="gender&q ...
- thymeleaf 常用标签
1.th:field th:field="*{user.sex}" 此标签会自动填充数据,比如用户的性别 user.sex 如果不为空,则会自动勾选上 2.th:each=&qu ...
- SpringBoot入门系列(五)Thymeleaf的常用标签和用法
前面介绍了Spring Boot 中的整合Thymeleaf .不清楚的朋友可以看看之前的文章:https://www.cnblogs.com/zhangweizhong/category/16577 ...
- 4.Thymeleaf的常用标签
一.常用标签 二.foreach案例 1.创建项目 2. 创建Student.java package cn.kgc.pojo; /** * Created by Administrator on 2 ...
- SpringBoot 中常用注解@Controller/@RestController/@RequestMapping的区别
SpringBoot中常用注解@Controller/@RestController/@RequestMapping的区别 @Controller 处理http请求 @Controller //@Re ...
- SpringBoot thymeleaf模板版本,thymeleaf模板更换版本
SpringBoot thymeleaf模板版本 thymeleaf模板更换版本 修改thymeleaf模板版本 ================================ ©Copyright ...
- SpringBoot 中常用注解@Controller/@RestController/@RequestMapping介绍
原文 SpringBoot 中常用注解 @Controller/@RestController/@RequestMapping介绍 @Controller 处理http请求 @Controller / ...
- thymeleaf自定义标签方言处理
项目背景:springboot+thymeleaf thymeleaf两种方式处理自定义标签:AbstractAttributeTagProcessor 和 AbstractElementTagPro ...
- springBoot项目常用maven依赖以及依赖说明
springBoot项目常用maven依赖以及依赖说明 1:maven-compiler-plugin <build> <plugins> <!-- 指定maven编译的 ...
- springboot thymeleaf【转】【补】
thymeleaf模板 https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html 1.引入thymeleaf依赖 <!-- ...
随机推荐
- MySQL数据类型补充
数据类型 整数数据类型 特殊说明: 对于整数类型,MySQL还支持在类型名称后面加小括号(M),而小括号中的M表示显示宽度,M的取值范围是(0, 255).int(M)这个M在字段的属性中指定了u ...
- CSS nth-child
前言 nth-child 伪类选择器非常地好用,所以必须得掌握它,能够为我们简化不少的 CSS 代码.比如选择前 n 行元素.选择后 n 行元素.选择奇偶行元素.选择 n 倍元素等.其语法本文不说,请 ...
- python 2.7中matplotlib的所有版本
matplotlib versions: 0.86, 0.86.1, 0.86.2, 0.91.0, 0.91.1, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, ...
- Linux操作命令(五)1.find命令 2.xargs命令
1.find命令(一) 查找,沿着文件层次结构向下遍历,匹配符合条件的文件,并执行相应的操作 参数 描述 -print find 命令将匹配的文件输出到标准输出 -exec find 命令对匹配的文件 ...
- [GKCTF2021]random
[GKCTF2021]random 本题出现了MT19937伪随机数生成算法. 目录 [GKCTF2021]random 题目 分析 MT19937算法 步骤 代码实现 解法1 解法2 总结 题目 t ...
- Windows常用快捷键(但我本人不太熟知的)
Shift+Ctrl+ESC: 打开任务管理器 Windows+E: 打开文件资源管理器 Windows+R: 运行文件 Windows+Tab: 切换应用程序 Shift+Delete: 永久删除
- .net core 3.1 上传大文件报错413 Payload Too Large
IIS配置如下 https://www.cnblogs.com/hallejuayahaha/p/12884347.html 代码里面新增 services.Configure<FormOpti ...
- 设计模式 > 单一职责原则
SOLID原则并非单纯的1个原则,而是由5个设计原则组成的,它们分别是单一职责原则,开闭原则,里氏替换原则,接口隔离原则和依赖反转原则. 单一职责原则(SRP) 定义:一个类或者模块只负责完成一个职责 ...
- ES搜索- term与match区别&bool查询
term属于精确匹配,只能查单个词,tems可以匹配多个词(满足其中之一词的都会被搜索出来),多个词如果要同时匹配使用bool的must(must中带多个term): match进行搜索的时候,会先进 ...
- 2022-05-30内部群每日三题-清辉PMP
1.对于一个长期的基础设施项目,由于全球商业环境,项目经理必须获得风险最小的供应商.项目经理应该使用什么合同类型? A.固定总价合同(FFP) B.成本加固定费用合同(CPFF) C.总价加激励费用合 ...