码迷,mamicode.com
首页 > 其他好文 > 详细

mvel 2

时间:2017-04-10 11:41:26      阅读:333      评论:0      收藏:0      [点我收藏+]

标签:str   log   div   ring   password   ==   lang   bsp   black   

<?xml version="1.0" encoding="GBK"?>
<Packet type="REQUEST" version="1.0">
    <Head>
        <RequestType>0001</RequestType>
        <User>bobo</User>
        <Password>a123456</Password>
    </Head>
    <Body>
    @if{String obj1=new java.lang.String("aaa") != null}
        aaaaaaa
    @end{}
    
    @{String obj2=new java.lang.String("yyyyyyy")}
        @{obj2}
        <Person>
            <PersonName>@{person.name}</PersonName>  @comment{人名字}
            <PersonAge>@{person.age}</PersonAge>  @comment{人年龄}
        </Person>
        <CatList>
            @foreach{y : person.catList.size()}
                <Cat>
                    @comment{叫的lulu这只猫 不要显示}
                    @if{person.catList[y].name ==‘lulu‘}
                    
                    @else{}@comment{list里面只有3只猫,所以只会显示2只猫打印出来}
                        <Name>@{person.catList[y].name}</Name> @comment{猫名字}
                        <Color>@{person.catList[y].color}</Color> @comment{猫颜色}
                    @end{}
                </Cat>
            @end{}
        </CatList>
    </Body>
</Packet>

 

 

<?xml version="1.0" encoding="GBK"?><Packet type="REQUEST" version="1.0">    <Head>        <RequestType>0001</RequestType>        <User>bobo</User>        <Password>a123456</Password>    </Head>    <Body>            aaaaaaa            yyyyyyy        yyyyyyy        <Person>            <PersonName>bobo</PersonName>              <PersonAge>18</PersonAge>          </Person>        <CatList>                            <Cat>                                                                <Name>mimi</Name>                         <Color>black</Color>                                     </Cat>                            <Cat>                                                                <Name>xixi</Name>                         <Color>yellow</Color>                                     </Cat>                            <Cat>                                                                                                </Cat>                    </CatList>    </Body></Packet>

 

mvel 2

标签:str   log   div   ring   password   ==   lang   bsp   black   

原文地址:http://www.cnblogs.com/bobo1713930654/p/6687505.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!