org.mybatis.spring.MyBatisSystemException : nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘token_exptime’ in ‘class com.zyd.beans.Admin’

at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)

at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)

Caused by: org.apache.ibatis.reflection.ReflectionException : There is no getter for property named ‘usersname’ in ‘class com.zyd.beans.Admin’

原因:

实体类的定义里和数据库里列名定义相同为token_exptime,因此自动获取到的变量都是和实体类中定义的相同名字为token_exptime,

但在mapping的xml文件中数据库语句里

token_exptime 写成了tokenExptime,spring找不到token_extime因此就报错.

反观这个错误发生的原因,这个mapping.xml文件是mybatis generater
自动生成的,数据库中定义为token_exptime,所以只能有一个可能那就是自动生成的代码中对参数的定义是没有下划线”_”这种符号的,所以以后在数据库中定义属性名字是不应该带下划线,否则要改很多地方。

[SSM]There is no getter for property named 'token_exptime' in 'class com.hdu.model.Student'相关推荐

  1. 关于myBatis的问题There is no getter for property named 'USER_NAME' in 'class com.bky.model.实例类'...

    现在流行的 ssm(spring + struts2 + myBatis)  持久层的mybatis是需要配置映射器的,找了个demo连接的数据库是MySQL 于是就修改了一下弄成了连接Oracle的 ...

  2. 关于myBatis的问题There is no getter for property named 'USER_NAME' in 'class com.bky.model.实例类'

    现在流行的 ssm(spring + struts2 + myBatis)  持久层的mybatis是需要配置映射器的,找了个demo连接的数据库是mysql 于是就修改了一下弄成了连接oracle的 ...

  3. Mybatis报错:There is no getter for property named 'xxxx' in 'class xxxx之解决办法

    org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.Reflecti ...

  4. mybatis 报错There is no getter for property named 'XXX' in 'class com.xx.xx'

    mybatis报错信息记录: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException ...

  5. resultMap使用不当导致出现There is no WRITEABLE property named 'student_id' in class 'com.ssi.model.Stud

    修改前: Student.java Student.xml 提示:There is no WRITEABLE property named 'studentId' in class 'com.ssi. ...

  6. SSM框架报错分析(一)——There is no getter for property named 'XXX' in 'class java.lang.String'...

    一.发现问题<select id="queryStudentByNum" resultType="student" parameterType=" ...

  7. There is no getter for property named 'XXX' in class 'aaa.bbb.ccc'(终极骚操作的解决方法)...

    使用SpringBoot整合Mybatis时,遇到了像标题的异常,博主当时是用Bean类对象作为参数的,所以百度了很久都没有建设性答案.贴一下报错的xxxDao文件和xxxMapper.xml文件: ...

  8. here is no getter for property named 解决方案及问题分析

    SSM框架中没有 There is no getter for property named 'name' in 'class com.itheima.domain.UserVO' 翻译成中文的大致意 ...

  9. There is no getter for property named 'XXX' in class 'aaa.bbb.ccc'(终极骚操作的解决方法)

    使用SpringBoot整合Mybatis时,遇到了像标题的异常,博主当时是用Bean类对象作为参数的,所以百度了很久都没有建设性答案.贴一下报错的xxxDao文件和xxxMapper.xml文件: ...

最新文章

  1. tomcat源码学习
  2. wxWidgets:将所有内容与 wxString 相互转换
  3. Eclipse变量名自动补全问题 自定义上屏按键为TAB
  4. @transactional注解失效情况
  5. oracle 10 数据库覆盖
  6. 智能指针分配动态数组
  7. nginx与php处理用户请求,配置 NGINX 处理 PHP 的请求《 LEMP 网站应用运行环境 》
  8. 获得iframe中的对象的方法
  9. iOS开发之抓包工具的Charles的初步安装使用:一步一步教你学会抓包工具Charles的使用(下载破解+代理设置+证书配置)
  10. React 引入阿里矢量图标方法
  11. 卡巴斯基7.0最新激活码
  12. Linux驱动里的wmb函数
  13. 二进制文件文本文件和二进制数据
  14. springboot项目中访问不到html页面问题
  15. 页码怎么设置从某一页位置开始,word文档如何设置开始页面
  16. RabbitMQ--扩展--11--均衡负载
  17. [数据讨论][解包相关]下江小春也能轻松掌握的碧蓝档案提取工具
  18. 损坏Word文档的几种修复方法
  19. 教你看懂晦涩的5G英文缩写-初学者篇
  20. 【R语言】使用nnet过程中报错Error in eval(predvars, data, env) : object ‘naulong‘ not found

热门文章

  1. python程序设计基础课后习题答案(电子版,可复制)第二章
  2. 重庆大自考和小自考的区别是什么?
  3. 基金的单位净值NAV
  4. 神经网络算法是什么意思,神经网络计算工作原理
  5. ECG-QRS检测参考代码
  6. python用法查询软件_GitHub - ahahahahawd/youdao: 基于python 的命令行下查词工具,使用有道api...
  7. thinkadmin验证器与场景验证
  8. Code::Blocks护眼背景设置
  9. 地大计算机学院导师李振华简介,李振华
  10. OpenCL 相关资源