mybatis jdk11遇到问题,jdk7没有问题:Mybatis报错invalid comparison: java.lang.StringBuffer and java.lang.String

jdk7 无问题
​​​​​​​<select id="find" resultMap="result" parameterType="map">
       select * from user where 1=1 
       <if test="_CONDITION != null and _CONDITION != ''">
            ${_CONDITION}
        </if>
</select>

jdk 11 报错invalid comparison: java.lang.StringBuffer and java.lang.String

​​​​​​​<select id="find" resultMap="result" parameterType="map">
       select * from user where 1=1 
       <if test="_CONDITION != null and _CONDITION != ''">
            ${_CONDITION}
        </if>
</select>

正确写法:

​​​​​​​<select id="find" resultMap="result" parameterType="map">
       select * from user where 1=1 
       <if test="_CONDITION != null">
            ${_CONDITION}
        </if>
</select>

猜你喜欢

转载自blog.csdn.net/lv842586821/article/details/89520701
今日推荐