Spring Boot学习日记14

Thymeleaf 语法学习

简单表达式:

变量表达式:${...}
选择变量表达式:*{...}
消息表达式:#{...}
链接网址表达式:@{...}
片段表达式:~{...}
文字

文本文本:,,…'one text'``'Another one!'
数字文字: , , , ,…0``34``3.0``12.3
布尔文字: ,true``false
空文本:null
文字标记: , , ,…one``sometext``main
文本操作:

字符串串联:+
文字替换:|The name is ${name}|
算术运算:

二元运算符: , , , , ,+``-``*``/``%
减号(一元运算符):-
布尔运算:

二元运算符: ,and``or
布尔否定(一元运算符):,!``not
比较和平等:

比较器: , , , ( , , ,>``<``>=``<=``gt``lt``ge``le)
等运算符: , (,==``!=``eq``ne)
条件运算符:

如果-那么:(if) ? (then)
如果-然后-否则:(if) ? (then) : (else)
违约:(value) ?: (defaultvalue)
特殊代币:

无操作:_
Simple expressions:

Variable Expressions: ${...}
Selection Variable Expressions: *{...}
Message Expressions: #{...}
Link URL Expressions: @{...}
Fragment Expressions: ~{...}
Literals

Text literals: , ,…'one text'``'Another one!'
Number literals: , , , ,…0``34``3.0``12.3
Boolean literals: , true``false
Null literal: null
Literal tokens: , , ,…one``sometext``main
Text operations:

String concatenation: +
Literal substitutions: |The name is ${name}|
Arithmetic operations:

Binary operators: , , , , +``-``*``/``%
Minus sign (unary operator): -
Boolean operations:

Binary operators: , and``or
Boolean negation (unary operator): , !``not
Comparisons and equality:

Comparators: , , , (, , , >``<``>=``<=``gt``lt``ge``le)
Equality operators: , (, ==``!=``eq``ne)
Conditional operators:

If-then: (if) ? (then)
If-then-else: (if) ? (then) : (else)
Default: (value) ?: (defaultvalue)
Special tokens:

 

posted @ 2024-02-29 16:34  软件拓荒人  阅读(8)  评论(0)    收藏  举报