一般遇到这种问题肯定要看一看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. #227 Generate Random Whole Numbers within a Range

    我们之前生成的随机数是在0到某个数之间,现在我们要生成的随机数是在两个指定的数之间. 我们需要定义一个最小值和一个最大值. 下面是我们将要使用的方法,仔细看看并尝试理解这行代码到底在干嘛: Math. ...

  2. CCNA学前基础一

    网络设备: 集线器:集线器就是一种采用共享式工作状态的设备.Hub将信号放大后传输给其他端口,即传输线路是共享的. 交换机:用于连接终端设备,和基本的安全功能还有广播域的隔离.优点实现多用户同时访问, ...

  3. zookeeper原理与安装

    Zookeeper是一个开源的分布式的,为分布式应用提供协调服务的Apache项目. 1.   Zookerper工作机制 2.   Zookeeper工作特点 3.   Zookeeper文件系统: ...

  4. SSAS 后端数据库访问模块中存在错误。 为绑定指定的大小太小,导致一个或多个列值被截断。

    在处理AS的过程中报错如上,经排查发现原因为数据库 “工号” 字段长度过长导致. 因为我的字段内容基本是人名加工号:张三/1001 不曾想有用户录入非正常数据 :张三/100/1001 这样导致我截取 ...

  5. 漏洞利用教程:msfpayload 和 Backdooring EXEs

    漏洞利用教程:msfpayload 和 Backdooring EXEs 此版本的PrimalSec漏洞教程系列将介绍如何使用msfpayload创建各种有效负载.msfpayload是Metaspl ...

  6. 腾讯技术分享:微信小程序音视频与WebRTC互通的技术思路和实践

    1.概述 本文来自腾讯视频云终端技术总监rexchang(常青)技术分享,内容分别介绍了微信小程序视音视频和WebRTC的技术特征.差异等,并针对两者的技术差异分享和总结了微信小程序视音视频和WebR ...

  7. Javascript高级编程学习笔记(40)—— DOM(6)CDATASection、DocumentType

    CDATASection类型 CDATASection类型是只针对XML文档的类型 因为浏览器无法解析 在浏览器中创建CDATASection的函数也无法正常使用 该类型有以下属性 nodeType: ...

  8. HashMap 和 Hashtable 的 6 个区别,最后一个没几个人知道!

    HashMap 和 Hashtable 是 Java 开发程序员必须要掌握的,也是在各种 Java 面试场合中必须会问到的. 但你对这两者的区别了解有多少呢? 现在,栈长我给大家总结一下,或许有你不明 ...

  9. Hystrix 停止开发。。。Spring Cloud 何去何从?

    栈长得到消息,Hystrix 停止开发了... 大家如果有对 Hystrix 不清楚的,请看下这篇文章:分布式服务防雪崩熔断器,Hystrix理论+实战. 来看下 Hystrix 停止开发官宣: ht ...

  10. Java内存溢出异常(下)

    此篇是上一篇文章Java内存溢出异常(上)的续篇,没有看过的同学,可以先看一下上篇.本篇文章将介绍剩余的两个溢出异常:方法区和运行时常量池溢出. 方法区和运行时常量池溢出 这部分为什么会放在一起呢?在 ...