mybatis开发时报错:
org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'str' in 'class java.lang.String'
问题出在判断这行
<if test="str != null">
WHERE phone_md5 = #{str}
</if>
应该String类型变量用_parameter替换
<if test="_parameter != null">
WHERE phone_md5 = #{str}
</if>
本文介绍了一个关于MyBatis框架使用中出现的错误:针对String类型参数在XML映射文件中的不当使用导致的异常,并提供了正确的解决方案。

被折叠的 条评论
为什么被折叠?



