---
title: "org.mybatis.spring.MyBatisSystemException: nested exception is "
author: "843977358"
date: "2015-01-31T15:40:42Z"
tags: ["Exception", "MyBatis"]
categories: ["编程语言"]
slug: "org-mybatis-spring-mybatissystemexception-nested-exception-is"
draft: false
lastmod: "2015-01-31T15:40:42Z"
id: 2182008
url: "https://843977358.iteye.com/blog/2182008"
---

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'usersname' 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'

...

 

原因:

    在bean的xml文件中

username 错误的写成了usersname，spring找不到usersname因此就报错