mybatis 映射文件中,if标签判断字符串相等,两种方式: 具体方法: <if test="sex==‘W’.toString()" 注意: 不能使用 因为mybatis会把’W’解析为字符,java是强类型语言