1.错误信息org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘param1‘ in ...

1.错误信息
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘param1‘ in ‘class com.lxh.mybatis.pojo.User‘
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘param1‘ in ‘class com.lxh.mybatis.pojo.User‘
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
at com.lxh.mybatis.test.MybatisTest.main(MybatisTest.java:55)
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘param1‘ in ‘class com.lxh.mybatis.pojo.User‘
at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:380)
at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:170)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:152)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:48)
at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:116)
at org.apache.ibatis.executor.BaseExecutor.createCacheKey(BaseExecutor.java:186)
at org.apache.ibatis.executor.CachingExecutor.createCacheKey(CachingExecutor.java:129)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
... 3 more
2.原因:xml文件中配置参数错误
3.解决:修改过来就好了
' in 'class com.lxh.mybatis.pojo.User'' ref='nofollow'>Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'param1' in 'class com.lxh.mybatis.pojo.User'
原文:https://www.cnblogs.com/lxhK/p/13109744.html
本文标题为:Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'param1' in 'class com.lxh.mybatis.pojo.User'


基础教程推荐
- 通过StatefulSet部署有状态服务应用实现方式 2022-10-01
- RFO SIG之openEuler AWS AMI 制作详解 2022-12-28
- Apache Kafka 2.5 稳定版发布,新特性抢先看 2023-09-11
- windows环境下apache-apollo服务器搭建 2023-09-10
- Apache CarbonData 1.0.0发布及其新特性介绍 2023-09-11
- 为Win2003服务器打造铜墙铁壁的方法步骤 2022-09-01
- Docker容器操作方法详解 2022-11-13
- Centos7 nginx的安装以及开机自启动的设置 2023-09-22
- P3 利用Vulnhub复现漏洞 - Apache SSI 远程命令执行漏洞 2023-09-10
- Centos 安装Django2.1 2023-09-24