MyBatis关联标签不适用于3.4.6版本升级

时间:2018-12-14 17:02:34

标签: mybatis

我最近将mybatis版本从3.2.7升级到了3.4.6。除了更新Maven依赖项外,我没有做任何其他更改。关联代码现在无法正常工作;我收到以下错误:

原因:java.lang.IllegalArgumentException:结果映射集合不包含com.ask.sem.business.dao.SearchEngineMapper.searchEngineResultMap的值     在org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor $ AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)

这是导致错误的映射器: 命名空间为“ com.ask.sem.business.dao.ApiCredentialMapper”

<resultMap id="apiCredentialResultMap" type="com.ask.sem.business.model.ApiCredential">
  <id property="id" column="id"/>
  <result property="primaryToken" column="primary_token"/>
  <result property="secondaryToken" column="secondary_token"/>
  <result property="username" column="user_name"/>
  <result property="password" column="password"/>
  <result property="emailAddress" column="email_address"/>
  <result property="environment" column="environment"/>
  <result property="domainId" column="domain_id"/>
  <result property="userAgent" column="user_agent"/>
  <result property="applicationId" column="app_id"/>
  <result property="applicationSecret" column="app_secret"/>
  <result property="refreshToken" column="refresh_token"/>
  <association property="searchEngine" columnPrefix="se_"
    resultMap="com.ask.sem.business.dao.SearchEngineMapper.searchEngineResultMap"/>
</resultMap> 

0 个答案:

没有答案