今天算是见识了什么事顺序的重要性。

在使用mybatis时由于联合了其他的表,用到了resultMap,之后外加association这一项。可是在替换对应字段的位置上加上association总是报错。

后来在网上看了才知道,原来resultMap的中顺序必须是

<resultMap>

  <id></id>

  <result />

  ......

  <association />

  .....

  <collection/>

</resultMap>

这个意思。给自己张张知识了,哈哈

错误Mybatis 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminat的更多相关文章

  1. 解决 Mybatis 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminat

    在配置 mybatis mapper.xml文件时, 一不小心就会报如下类似的异常: Caused by: org.springframework.beans.factory.BeanCreation ...

  2. Mybatis 元素类型为 "resultMap" 的内容必须匹配 "(constructor?,id*,result*,association*,collection*,discriminat

    <resultMap id="BaseResultMap" type="com.youotech.tl_cons_credit_rating.entity.TL_C ...

  3. mybatis项目启动报错 The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".

    启动项目报错 2018-02-26 17:09:51,535 ERROR [org.springframework.web.context.ContextLoader] - Context initi ...

  4. MyBatis 元素类型为 "configuration" 的内容必须匹配 ".....

    修改MyBatis配置文件时,添加typeAliases节点,报了一个BuilderException: org.apache.ibatis.exceptions.PersistenceExcepti ...

  5. 元素类型为 "configuration" 的内容必须匹配 "(properties?,settings?,typeAliases?,typeHandlers?

    报错主要部分如下: Error building SqlSession.### Cause: org.apache.ibatis.builder.BuilderException: Error cre ...

  6. Caused by: 元素类型为 "package" 的内容必须匹配 "(result-types?,interceptors?,default-interceptor-ref?,default-action-ref?,default-class-ref?,global-results?,global-exception-mappings?,action*)"

    Caused by: 元素类型为 "package" 的内容必须匹配 "(result-types?,interceptors?,default-interceptor- ...

  7. org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 32; 元素类型为 "key" 的内容必须匹配 "(column)*"

    报错:部分错误信息,主要查看CauseBy Caused by: org.hibernate.InvalidMappingException: Unable to read XML at org.hi ...

  8. Struts配置文件报错"元素类型为 "package" 的内容必须匹配"

    报错信息 元素类型为 "package" 的内容必须匹配 "(result-types?,interceptors?,default-interceptor-ref?,d ...

  9. The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collectio

    The content of element type "resultMap" must match "(constructor?,id*,result*,associa ...

随机推荐

  1. c# 多线程与异步调用

    异步操作的本质 在方法调用前为异步方法指定一个回调函数,方法调用后被线程池中的一个线程接管,执行该方法.主线程立即返回,继续执行其他工作或响应用户请求.如果异步方法执行完 毕,回调函数被自动执行,以处 ...

  2. linux:问题

    1>.Xshell远程连接linux闲置时间过长会自动中断连接: 2>.在linux环境下乱码: 3>.在linux下面执行mv /bin/ls /root/bin之后执行ls就不能 ...

  3. Canopy算法聚类

    Canopy一般用在Kmeans之前的粗聚类.考虑到Kmeans在使用上必须要确定K的大小,而往往数据集预先不能确定K的值大小的,这样如果 K取的不合理会带来K均值的误差很大(也就是说K均值对噪声的抗 ...

  4. 实验十四_访问CMOS RAM

    编程:以"年/月/日 时:分:秒"的格式,显示当前的日期,时间. 注意:CMOS RAM中存储着系统的配置信息,除了保存时间信息的单元外,不要向其他的单元写入内容,否则将引起一些系 ...

  5. PostgreSQL wiki

    https://wiki.postgresql.org/wiki/Main_Page https://wiki.postgresql.org/wiki/Converting_from_other_Da ...

  6. Winform ListView 元素拖动

    //ListView 属性 /* AllowDrop : True */ ListView objLVDrag; private void listView_DragDrop(object sende ...

  7. Android -- 自定义View小Demo(一)

    1,现在要实现下图的简单效果,很简单  ,就是使用paint在canvas上绘制5中不同颜色的圆圈,效果图如下: 这是绘制基本图形一种最简单的方法,下面是它的代码 ,注释写的很详细,也就不去讲解了 M ...

  8. Android 利用Service实现下载网络图片至sdk卡

    package com.example.myapp5; import android.app.Activity; import android.content.Intent; import andro ...

  9. ThinkPHP讲解(六)——添加数据

    添加数据到数据库有三种方式 第一种:使用数组添加 $model=D("Info"); //实例化对象 //添加数据的第一种方式:使用数组添加 //要添加的数组,必须是关联数组,ke ...

  10. (第九周)视频发布及git统计报告

    项目名:食物链教学工具 组名:奋斗吧兄弟 组长:黄兴 组员:李俞寰.杜桥.栾骄阳.王东涵 代码地址:HTTPS: https://git.coding.net/li_yuhuan/FoodChain. ...