zoukankan      html  css  js  c++  java
  • mybatis特殊字符转义

    使用mybatis的时候,特殊字符,例如<,>,<>,.....

    需使用以下进行转义

    &lt; < 小于号  
    &gt; > 大于号
    &amp; &  
    &apos; ' 单引号
    &quot; " 双引号
        <select id="selectByExampleExt" parameterType="com.cn21.redisCluster.model.AppInfoExampleExt" resultMap="BaseResultMapExt">
            SELECT temp.*,r.* from (
                SELECT a.* from appinfo as a where 1=1 
                <if test="appid != null and appid != '' ">
                    and a.appid=#{appid,jdbcType=VARCHAR}
                </if>
                <if test="productid != null">
                    and a.productid=#{productid,jdbcType=INTEGER}
                </if>
                ORDER BY a.lastupdatetime DESC
                <if test="limitStart&gt;=0 and limit&gt;0">   (这里就是类似的 <if test="limitStart>=0 and limit>0">
                    LIMIT ${limitStart} , ${limit}
                </if>
                <if test="limitStart==-1 and limit&gt;0">
                    LIMIT ${limit}
                </if>
                 ) temp,redisdb r where temp.appid = r.appid
        </select>
  • 相关阅读:
    vue--一些预设属性
    vue--vux框架的使用
    vue--vConsole
    vue--音乐播放器
    vue--使用vue-cli构建项目
    vue--实例化对象
    vue--数据显示模版上
    CSS--交互效果
    Git SSH公钥配置
    gradle配置国内镜像
  • 原文地址:https://www.cnblogs.com/But-you/p/10723356.html
Copyright © 2011-2022 走看看