今天在用mybatis查询时报了一个错误,提示ypxxCustom对象没有getter属性。错误代码如下:
  Caused by: org.apache.ibatis.reflection.ReflectionException:
There is no getter for property named ‘ypxxCustom’in’class
com.onespace.ypcg.pojo.GysypmlQueryVo’

  后来查看了一下我的mapper.xml文件发现,里面有ypxx的sql查询条件。
There is no getter for property named 'ypxxCustom'in'class com.onespace.ypcg.pojo.GysypmlQueryVo'
  但是在parameterType的GysypmlQueryVo中没有ypxxCustom的信息,错误提示很明显了。我自己查看了一下GysypmlQueryVo这个包装类里面没有定义这个属性。以后写sql时要好好检查一下po类和mapper映射文件是否一一对应,否则真是容易报错。

相关文章:

  • 2021-05-09
  • 2021-04-07
  • 2021-09-11
  • 2021-10-03
  • 2021-07-10
  • 2021-04-24
  • 2022-02-04
猜你喜欢
  • 2021-05-04
  • 2021-09-12
  • 2022-12-23
  • 2021-12-07
  • 2021-06-15
  • 2021-08-17
  • 2022-12-23
相关资源
相似解决方案