MyBatis动态分页查询if中的test值,该如何写

主要是验证myBatis动态分页查询语句中test的值是否可以随便写,我在里面写的是zhi1,最后报如下错误(可以看加粗部分)

@[T19:21:10,268 DEBUG DefaultHandlerExceptionResolver:137 -Resolving exception from handler [public com.itheima.entity.PageResult com.itheima.controller.CheckgroupController.findByPage(com.itheima.entity.QueryPageBean)]: java.lang.RuntimeException: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘zhi1’ in 'class java.lang.String’
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘zhi1’ in ‘class java.lang.String’
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
at org.mybatis.spring.SqlSessionTemplate S q l S e s s i o n I n t e r c e p t o r . i n v o k e ( S q l S e s s i o n T e m p l a t e . j a v a : 446 ) a t c o m . s u n . p r o x y . SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) at com.sun.proxy. SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)atcom.sun.proxy.Proxy36.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
at com.sun.proxy.$Proxy38.findByPage(Unknown Source)

当把值改为value之后,就可以正常显示数据了
可以看图标记部分

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值