当前位置:网站首页>Usage Summary of thymeleaf
Usage Summary of thymeleaf
2022-07-28 20:26:00 【Cute and strange】
Finished a project , Use everything thymeleaf Summarize and record the usage of , Anyway, I can't remember it , Make a note for future reference .
0. Data sources
stay java The backend is added to model in , Keys based on key value pairs , stay html Reading in the file .

1.th:text
th:text="${question}"
<!-- String and variable splicing -->
th:text="' By the time :'+${date}"2.th:if
th:if="${var1 != var2}"
th:if="${user.type == 1}"3.th:each
<!-- Traverse users(list) -->
th:each="user : ${users}"
4. Ternary operator
th:text="${user.type==1?' Administrators ':' Label workers '}"5.th:onclick
th:onclick="deleteUser([[${user.id}]]);"
th:onClick="|working(${projectId},${index+1},${taskId})|"6.th:href
th:href="@{'/downloadExcel/'+${project.id}+'/'+${project.name}}"
th:href="@{/(page=${pageDTO.page+1})}"7.th:style
th:style=" 'width:' + @{${project.progress}} +'%; height: 6px;' " th:aria-valuenow="${project.finishedCount}"8. Processing time format
th:text="${#dates.format(project.gmtCreate,'yyyy-MM-dd')}"
th:text="${#dates.format(project.deadline,'yyyy-MM-dd HH:mm')}"9.th:class
th:class="'page-item ' + @{${pageDTO.page==page}?'active':''}"
边栏推荐
- Vivado designs PC and ram
- Vivado design single cycle CPU
- Simple example of C language 1
- Scheduled backup of MySQL database under Windows system
- Communication learning static routing across regional networks
- Commands related to obtaining administrator permissions
- [C language] simulation implementation of strlen (recursive and non recursive)
- Product manager interview | innovation and background of the fifth generation verification code
- Usage of const and assert
- 6. Functions of C language, why functions are needed, how functions are defined, and the classification of functions
猜你喜欢
随机推荐
C语言数据 3(1)
[C language] guessing numbers game
ssm中项目异常处理
Raspberry pie 4B parsing PWM
How to use pycharm to quickly create a flask project
83. (cesium home) how the cesium example works
字符设备驱动结构
Data mining (data preprocessing) -- Notes
83.(cesium之家)cesium示例如何运行
Multi-Modal Knowledge Graph Construction and Application: A Survey
Basic mathematical knowledge (update)
Music says
New fruit naming (DP is similar to the longest common subsequence)
私有化部署的即时通讯平台,为企业移动业务安全保驾护航
上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
CNN convolutional neural network structure
Raspberry pie uses the command line to configure WiFi connections
Maximum exchange [greedy thought & monotonic stack implementation]
One article makes you understand what typescript is
[C language] summary of methods for solving the greatest common divisor








