zoukankan      html  css  js  c++  java
  • There is no getter for property named...

    错误信息

    org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'nul' in 'class com.qinsfu.param.AdminParam'

    引起该错误的原因就是xml中的参数没有在你定义的Mapper的方法实数中找到属性的映射,至于我的引起原因如下:

    <update id="update">
        update tb_admin
        <include refid="updatePart"/>
        <where>
            <choose>
                <when test="id != nul">id=#{id}</when>
                <otherwise>account=#{account}</otherwise>
            </choose>
        </where>
    </update>
    

    可以看到我把null打成了null,然后他误以为这个nul是在我的mapper中被提供的参数,然后他却没有在我的对应参数对象中找到对应nul属性的getter,也就是 There is no gettert for property named 'nul' in 'XXXX'.

  • 相关阅读:
    类别的三个作用
    require()
    commonJS
    ng-app&data-ng-app
    《css网站布局实录》(李超)——读书札记
    高性能JS(读书札记)
    两个同级div重叠的情况
    前端性能优化
    正则表达式
    ajax
  • 原文地址:https://www.cnblogs.com/freesfu/p/13797162.html
Copyright © 2011-2022 走看看