JAVA-075 / Advanced
Injecting input into MyBatis <if> OGNL conditions
Why is this a problem?
Test expressions are evaluated as OGNL, making it dangerous to mix input into them.
How to fix it
xml
<if test="name != null and name != ''"> AND name = #{name} </if>