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'
基础教程推荐
- Apache Hudi数据布局黑科技降低一半查询时间 2022-10-06
- IIS 6 的 PHP 最佳配置方法 2022-09-01
- linux下安装apache与php;Apache+PHP+MySQL配置攻略 2023-08-07
- 实战Nginx_取代Apache的高性能Web服务器 2023-09-29
- Apache服务器配置攻略3 2022-09-01
- centos 7 安装及配置zabbix agent 2023-09-24
- apache和nginx结合使用 2023-09-10
- nginx.conf(centos7 1.14)主配置文件修改 2023-09-23
- 服务器添加git钩子的步骤 2022-12-12
- linux之conda环境安装全过程 2023-07-11