thymeleaf Simple use of grammar

Non null judgment of set

th:if="${not #lists.isEmpty( Custom collection )}"
String splicing
<span th:text="|Welcome to home, ${}!|"> // This is actually equivalent to : <span th:text=
"'Welcome to home, ' + ${} + '!'"> // Text substitution can be combined with other types of representations : <span th:text=
"${onevar} + ' ' + |${twovar}, ${threevar}|">
decimal ( rounding )
// display 1.24 th:text="${#numbers.formatDecimal(1.235, 1, 2)}"
a label - Hyperlinks
// display 1.24 <a th:href=
>view</a> <a th:href="@{/companyUser/{}/getUserByUserName>view</a>
Ternary operator judgment
th:text="'Execution mode is ' + ( ('0'!='0')? 'Development' : 'Production')"

©2020 ioDraw All rights reserved
Self made whole person computer program PHP call shell command python Simple record of network programming layui.table Examples of dynamically getting header and list data Big data environment --- data warehouse (hive+mysql+hadoop) The construction of What are the types of variables ?MYSQL database DML Common commands 《 From machine learning to deep learning 》 note (2) Unsupervised learning log4j Method of printing exception stack information Android Development — Display food information according to customer budget