Spring笔记 - Spring Expression Language (SpEL表达式)

2014-11-24 10:38:29 · 作者: · 浏览: 0

基本表达式

数字5

联合方式

浮点型

科学表达式10000.0

String

Boolean

引用Bean 等价

引用Bean属性

引用Bean方法

进阶一

进阶二 防空指针 防空指针

使用静态类 T(java.lang.Math)

使用静态属性

使用静态方法

运算表达式

+

-

*

/

%

^

+ overloaded

== eq equal

<=

Equal == eq
Less than < lt
Less than or equals <= le
Greater than > gt
Greater than or equals >= ge

逻辑表达式

and A logical AND operation; both sides must eva luate true for the expression to be true
or A logical OR operation; either side must eva luate true for the expression to be true
not or ! A logical NOT operation; negates the target of the operation

条件表达式 :

等价 Elvis operator

正则表达式

集合处理


p:name="Chicago"p:state="IL"p:population="2853114"/>
p:name="LasCruces"p:state="NM"p:population="91865"/>

List

进阶

Map

Properties

Properties

systemEnvironment

systemProperties

String s 'This is a test'[3]

. [] 条件选择成员

.^[] and .$[], for 第一个和最后一个匹配成员

.![] 抽取集合 List

进阶

进阶