使用的是ognl表达式,struts招牌 在mybatis的映射xml文件调用java类的方法: 1. SELECT * FROM EC_CORE_USER WHERE (user_name=#{userName} or mail =#{userName} or mobile_phone = '${@net.ytoec.framework.security.EncryptionDecryption@dSecret(userName)}') and user_password=#{userPassword} 入上面代码所示。此处应注意,方法必须为静态方法。 2.获取类里面的常量: r.czmc='${@com.ytoxl.module.datahub.kernel.dataobject.EcSystemLog@THE_AUDIT}' 3.判断是否为null: <iftest="@org.apache.commons.lang.StringUtils@isNotBlank(province)">andjdo.province=#{province}</if> 本文出自 “北纬的幻想” 博客,请务必保留此出处http://beiwei.blog.51cto.com/3666642/1542109