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依赖 <!-- ...
随机推荐
- 前瞻性研究: axSpA中轴放射学进展延缓得益于TNF抑制剂持续治疗3年
西班牙学者近期发表的这项前瞻性研究是基于axSpA患者注册登记数据库,患者登记入库后,继续治疗和评估3年[1]. 患者分为2组,组1有46例,在登记入库时已经在用肿瘤坏死因子抑制剂(TNFi)且已治疗 ...
- SpringCloud微服务实战——搭建企业级开发框架(四十九):数据字典注解的设计与实现
数据字典是系统中基本的必不可少的功能,在多种多样的系统中,数据字典表的设计都大同小异.但是使用方式确是多种多样,设计好一套易用的数据字典功能模块,可以使开发事半功倍. 常用的数据字典使用方式: 直 ...
- maven上传jar包或pom文件到远程仓库
一. 步骤 有时候,项目中打好的jar包或pom文件需要上传到远程仓库,步骤总结如下: 安装好maven,网上有很多教程,默认已安装 工程中的settings.xml增加相应的server账号密码: ...
- VS2010 发布网站总是连同cs文件一起发布了
选择第一个,保存再发布.cs文件 都删除了.
- angular js 实现模糊查询并分页
如果这篇文章能给你带来帮助,不胜荣幸,如果有不对的地方也请批评指正 共同进步,因为最近使用augular前段所以看了一下,为了加深印象,所以记录一下,废话不多说直接上代码. 首先来讲你可以使用page ...
- huawei--配置链路聚合
huawei--配置链路聚合 项目要求: LSW1和LSW2之间配置链路聚合,链路聚合分为手工和lacp两种模式.配置完后查看链路聚合状态. 项目实施: (vlan10 20 30的创建命令vlan ...
- springboot上传文件失败:The temporary upload location [/tmp/tomcat.7112002115745457830.8765/work/Tomcat/localhost/ROOT] is not valid
字面意思就是上传的临时目录不存在,问题就是linux系统会自动清理tmp目录下超过10天没有任何操作的目录或文件 解决办法 1.重启springboot服务,当然这只是暂时的,下次隔太久一样会失效 2 ...
- java SE02
目录 五.面向对象 1. 封装 2. 多态 3. 继承 六.内部类 1. 局部内部类 2. 局部内部类 3. 静态内部类 4.匿名内部类 七.异常 1. 五个关键字 2. 自定义异常 五.面向对象 1 ...
- docker搭建图片压测QPS3000+服务器(ftp+nginx)
docker搭建图片压测QPS3000+服务器(ftp+nginx) 在针对图片算法服务进行压力测试时,需要高性能的图片服务器 自己编写的图片应用性能不一定能达到要求 可能因为图片应用自身达不到压测要 ...
- gitlab-runner运行流水线过程中出现报错
1.提示error: could not lock config file D:\gitlab-runner\builds\fJW28yU8\0\auto_test_10\auto_test_dp20 ...