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

来源:互联网 发布:算法设计与分 考题 编辑:程序博客网 时间:2024/06/05 00:26
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>


1 0
原创粉丝点击