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