在mybatis的映射xml文件调用java类的方法:使用的是OGNL表达式,表达式格式为:${@prefix@methodName(传递参数名称)} 1.如下代码所示:方法必须为静态方法:以下我只是演示如何使用,随便用到了一个工具类SELECT * FROM USER WHERE name='${@org.apache.commons.lang3@StringUtils(name)}' 2.获取类里面的常量,获取的格式和上面一样,第二个@是常量 : ${@classpath@ static c…
mybatis的xml文件中的CDATA的使用 <!--查询列表--> <select id="queryListPage" parameterType="java.util.Map" resultType="java.util.Map"> select * from user where 1=1 <if test="startDate != null and startDate != ''"&g…