一般遇到这种问题肯定要看一看association中元素编写顺序,

<resultMap id="orderRslMap" type="orders">
<id property="id" column="id"></id>
<result property="number" column="number"></result>
<result property="createtime" column="createtime"></result>
<result property="note" column="note"></result>
<!--
property:为order类中属性
javaType:为具体类的类型
-->
<!-- 往orders的user匹配数据,模型里有模型,使用association来配置-->
<association property="user" javaType="user">
`<id property="id" column="user_id"></id>
<result property="username" column="username"></result>
<result property="address" column="address"></result>
</association>
</resultMap>

仔细观察几遍都没看出什么

很无语纠结,重新写一遍没有错误

反复对照,才发现在id元素前面多了一个 `

浪费了10分钟,记录一下,算个教训

使用IDEA我是把`设置成快捷键,发生这个错误也是正常,下次注意!

mybatis_ The content of element type association must match (constructor,id,result,ass ociation,collection,discriminator)的更多相关文章

  1. 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 ...

  2. 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 ...

  3. Multiple annotations found at this line: - The content of element type "mapper" must match "EMPTY". - Attribute "namespace" must be declared for element type "mapper".

    今天在mybatis的mapper映射配置文件中遇到了这样的问题,困扰了我3个小时: Multiple annotations found at this line: - The content of ...

  4. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,reflectorFactory?,plugins?,environments?,databaseIdProv

    在mybatis配置文件config.xml中报错: The content of element type "configuration" must match "(p ...

  5. The content of element type "package" must match "(result-types?,interceptors?...

    错误:“The content of element type "package" must match "(result-types?,interceptors?,de ...

  6. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...

  7. web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,

    错误:配置web.xml时,出现红色叉叉,提示 The content of element type "web-app" must match "(icon?,disp ...

  8. 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    [转]The content of element type "configuration" must match "(properties?,settings?,typ ...

  9. The content of element type "beans" must match "(description?,(import|alias|bean)*)

    The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...

随机推荐

  1. 关于NGUI Shader 和 Draw Call的优化 & 模糊shader

    序: 1.项目过程中不可避免的需要用到大量Shader 和 UITexture,由于Ngui对Shader支持非常糟糕,导致项目drawCall异常的高 2.Panel裁剪无法裁剪自定义shader内 ...

  2. DOSBOX的安装和使用(window10 64位)

    1.安装DOSBOX DOXBOX和MASM的下载和安装 2.使用DOSBOX 1.打开只有一个窗口的dosbox 2.修改dosbox的分辨率 1.打开DOSBox 0.74 Options.bat ...

  3. Redhat/CentOS7-环境虚拟机简单搭建Nginx+Tomcat负载均衡集群

    Tomcat服务器是一个免费的开放源代码的web应用服务器,属于轻量级应用服务器,是开发和调试JSP程序的首选.由于Tomcat处理静态HTML的能力运不及Apache或者Nginx,所以Tomcat ...

  4. 复习java基础

    十进制转换成二进制:     方法:整除法,计数方式从右往左,二进制中非0即1.例子如下: 计数方式是从右往左进行,然后填写数字的顺序是余数优先 二进制转换成十进制: 方法:乘二法,例如二进制数字为: ...

  5. Snapshot Types

    Volume managers Some Unix systems have snapshot-capable logical volume managers. These implement cop ...

  6. UnityTips:使用反射调用内部方法拓展编辑器

    大家都知道Unity是一个C/C++的游戏引擎,C#只是Unity提供的脚本层.因此大部分功能都是通过C#来调用底层的C++代码的.而一些朋友可能不知道的是,其实Unity的C#代码中也有很多方法是我 ...

  7. Android MonkeyRunner

    MonkeyRunner 也是一款安卓sdk自有的测试工具 可以用来做功能测试 阅读目录 MonkeyRunner环境搭建 1. 安装JDK的安装与配置 2. 安装Python编译器     http ...

  8. Photon自定义加载Resource之外的资源

    PhotonNetwork.cs 结尾添加如下代码: #region >>> Photon自定义异步加载GameObject public delegate void CustomL ...

  9. Jenkins的初级应用(1)-Publish Over SSH

    作为Jenkins最基本的应用也是重要的一环就是可以把文件传到服务器上面,或者在服务器上面远程执行命令.一个可在在远程分发了文件之后就控制远程服务器的操作.另外一个就是分发了文件之后,结合自动化工具在 ...

  10. Javascript高级编程学习笔记(36)—— DOM(2)Document

    Documet类型 了解了基础的Node类型过后,我们来聊聊Node中的Document类型 我们知道所有的节点都继承自Node类型 所以除了Node类型公有的方法和类型之外,Document类型还有 ...