There is no getter for property named 'str' in 'class java.lang.String'

xiaoxiao2021-02-28  60

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>

转载请注明原文地址: https://www.6miu.com/read-84840.html

最新回复(0)