mybatis中sql语句遇到大于号或小于号

来源:互联网 发布:淘宝卖家销量排行榜 编辑:程序博客网 时间:2024/06/11 07:40

这里写图片描述
应用:

<select id="listByStage" parameterType="Map" resultType="java.util.Map">    SELECT * FROM w_course c,w_user u WHERE c.student_id=u.id    and c.stage &gt;#{stage1} and c.stage &lt;#{stage2}  and    (IF(ISNULL(#{key}),true,u.real_name like #{key}) or    IF(ISNULL(#{key}),true,u.mobile like #{key})    )    limit #{start},#{limit}</select>

出现大小写时,tomcat无法正常启动,需换成xml的转义字符。

阅读全文
0 0
原创粉丝点击