关于找不到印社属性的问题的解决

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


因为是没有配置这个额所以是报错了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值