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'
- nginx中封禁ip和允许内网ip访问的实现示例 2022-09-23
- CentOS7安装GlusterFS集群的全过程 2022-10-10
- 教你在docker 中搭建 PHP8 + Apache 环境的过程 2022-10-06
- CentOS_mini下安装docker 之 安装docker CE 2023-09-23
- 阿里云ECS排查CPU数据分析 2022-10-06
- 利用Docker 运行 python 简单程序 2022-10-16
- KVM虚拟化Linux Bridge环境部署的方法步骤 2023-07-11
- IIS搭建ftp服务器的详细教程 2022-11-15
- 【转载】CentOS安装Tomcat 2023-09-24
- 解决:apache24 安装后闪退和配置端口映射和连接超时设置 2023-09-11