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+tomcat实现session共享 2023-09-08
- win10搭建配置ftp服务器的方法 2022-11-12
- centos 7智熄直接断电导致无法启动 2023-09-23
- centos7 nginx配置ssl证书实现https访问同时http访问 2023-09-22
- 利用Apache部署静态网站(一) 2023-09-09
- apache 环境下 php 的配置注意事项 2022-09-01
- Apache索引目录浏览的学习笔记 2023-09-28
- Docker镜像与容器的导入导出以及常用命令总结 2022-11-24
- Centos7 nginx启动脚本 2023-09-22
- Apache Spark源码走读之15 -- Standalone部署模式下的容错性分析 2023-09-28
