HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'agencyName' of 'class cc.moredo.domain.AgencyAccount' with value '北京力迈外国语学校' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'agencyName' in 'class cc.moredo.domain.AgencyAccount'
type Exception report
message Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'agencyName' of 'class cc.moredo.domain.AgencyAccount' with value '北京力迈外国语学校' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'agencyName' in 'class cc.moredo.domain.AgencyAccount'
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'agencyName' of 'class cc.moredo.domain.AgencyAccount' with value '北京力迈外国语学校' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'agencyName' in 'class cc.moredo.domain.AgencyAccount' org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:981) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860) javax.servlet.http.HttpServlet.service(HttpServlet.java:624) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause
出现这个原因的报错的因为是因为mybatis的xml文件中的文件关联是
<mapper namespace="cc.moredo.domain.AgencyAccount" >
<resultMap id="BaseResultMap" type="cc.moredo.domain.AgencyAccount" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="agency_id" property="agencyId" jdbcType="INTEGER" />
<result column="coupon_id" property="couponId" jdbcType="INTEGER" />
<result column="amount" property="amount" jdbcType="INTEGER" />
<result column="price" property="price" jdbcType="DOUBLE" />
<result column="discount" property="discount" jdbcType="INTEGER" />
<result column="ratio" property="ratio" jdbcType="INTEGER" />
<result column="alipay_app_id" property="alipayAppId" jdbcType="INTEGER" />
<result column="weipay_app_id" property="weipayAppId" jdbcType="INTEGER" />
<result column="alipay_web_id" property="alipayWebId" jdbcType="INTEGER" />
<result column="weipay_web_id" property="weipayWebId" jdbcType="INTEGER" />
<result column="status_id" property="statusId" jdbcType="INTEGER" />
</resultMap>
<resultMap type="cc.moredo.domain.AgencyAccount" id="AgencyAccountResultMap" extends="BaseResultMap">
<association property="agency" javaType="cc.moredo.domain.Agency" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="agency_name" property="agencyName" jdbcType="VARCHAR" />
<result column="linkman" property="linkman" jdbcType="VARCHAR" />
<result column="phone" property="phone" jdbcType="VARCHAR" />
因为没有配置这个association
因为是没有配置这个额所以是报错了