# 基本表达式

String   <property name="name" value="#{'Chuck'}"/> <property name='name' value='#{"Chuck"}'/>

Boolean <property name="enabled" value="#{false}"/>

# 运算表达式

/  <property name="average" value="#{counter.total/counter.count}"/>

% <property name="remainder" value="#{counter.total%counter.count}"/>

+ overloaded  <property name="fullName value="#{performer.firstName + '  ' + performer.lastName}"/>

==  eq equal <property name="equal" value="#{counter.total==100}"/>

<=  <propertyname="hasCapacity"value="#{counter.total le 100000}"/>

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 evaluate true for the expression to be true
or A logical OR operation; either side must evaluate true for the expression to be true
not or ! A logical NOT operation; negates the target of the operation

<property name="largeCircle" value="#{shape.kind =='circle'andshape.perimeter gt 10000}"/>

<property name="outOfStock" value="#{!product.available}"/>

<propertyname="song"  value="#{kenny.song !=null?kenny.song:'Greensleeves'}"/>

# 集合处理

<util:listid="cities">
<bean class="com.habuma.spel.cities.City"
p:name="Chicago"p:state="IL"p:population="2853114"/>
<bean class="com.habuma.spel.cities.City"
p:name="LasCruces"p:state="NM"p:population="91865"/>
</util:list>

List  <property name="chosenCity" value="#{cities[2]}"/>

Map <property name="chosenCity" value="#{cities['Dallas']}"/>

Properties <util:properties id="settings" location="classpath:settings.properties"/>

systemEnvironment <property name="homePath" value="#{systemEnvironment['HOME']}"/>

systemProperties <property name="homePath" value="#{systemProperties['application.home']}"/>

String  s  'This is a test'[3]

.?[]  条件选择成员 <property name="bigCities" value="#{cities.?[population gt 100000]}"/>

.^[] and .\$[], for 第一个和最后一个匹配成员 <property name="aBigCity" value="#{cities.^[population gt 100000]}"/>

.![] 抽取集合 List  <property name="cityNames" value="#{cities.![name]}"/>