XML <if test=""></if>判断字符串空值失效 失效代码——网上解决方案 <if test="username != null and username!=""'> ... </if> 在失效之后,准备通过字符串长度进行判断,在输出null长度之后,发现其长度为4,于是发觉其null为字符串形式,最终加入username!="null"问题解决 <if test="username != null and username!="" and username!="null"'> ... </if>