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>