mybatis_ The content of element type association must match (constructor,id,result,ass ociation,collection,discriminator)
一般遇到这种问题肯定要看一看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)的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- The content of element type "package" must match "(result-types?,interceptors?...
错误:“The content of element type "package" must match "(result-types?,interceptors?,de ...
- The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...
- 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 ...
- 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...
[转]The content of element type "configuration" must match "(properties?,settings?,typ ...
- The content of element type "beans" must match "(description?,(import|alias|bean)*)
The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...
随机推荐
- 在已有数据的表中添加id字段并且自增
各位大牛,小弟在开发过程中,遇到了这样一个问题,由于新功能的增加需要使原有的一张表的结构作出调整,需要添加一个id主键字段,但是因为表里有很多数据了,所以,怎样才能添加这个字段,并且使原有的数据也能够 ...
- Linux基础操作命令
一.系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统部件 – (SMBIO ...
- 移动APP外挂攻防实战
前言 近日,某某龙在2018年的一次会议上发表了一个演讲,4000多人聚集在现场玩“跳一跳”游戏.随着他们指尖的翻飞跳跃,大屏幕上的现场排名也在不断刷新……而在全场的惊叹声中,最高分出现了,967分! ...
- My year of 2017
有一个姓罗的胖子,他说他有一个要坚持20年计划,第一年我真的不觉得什么,好比每天晚上都要刷牙每天早上都要吃早饭一样简单.实际几年走下来之后,发现能坚持下来真不是一件容易的事情,生活中总会有各种各样的事 ...
- Javascript高级编程学习笔记(66)—— 事件(10)变动事件
变动事件 DOM2级的变动事件,能在DOM中的一部分发生变化时给出提示 变动事件是为XML或HTML DOM 设计的,并不特定于某种语言 DOM2级定义了如下变动事件: DOMSubtreeModif ...
- 配置IDM不限速下载百度云的大文件
IDM介绍Internet Download Manager(简称IDM)是一个用于Windows系统的下载管理器,它是共享软件,免费试用期为30天,但是每月均有一段时间优惠. IDM可以让用户自动下 ...
- 卷积神经网络CNN的原理(三)---代码解析
卷积神经网络在几个主流的神经网络开源架构上面都有实现,我这里不是想实现一个自己的架构,主要是通过分析一个最简单的卷积神经网络实现代码,来达到进一步的加深理解卷积神经网络的目的. 笔者在github上找 ...
- iOS学习——iOS开发小知识点集合
在iOS学习和开发过程中,经常会遇到一些很小的知识点和问题,一两句话就可以解释清楚了,这样的知识点写一篇随笔又没有必要,但是又想mark一下,以备不时之需,所以就有了本文.后面遇到一些小的知识点会不断 ...
- 如何在 Linux 中查看可用的网络接口
在我们安装完一个 Linux 系统后最为常见的任务便是网络配置了.当然,你可以在安装系统时进行网络接口的配置.但是,对于某些人来说,他们更偏爱在安装完系统后再进行网络的配置或者更改现存的设置.众所周知 ...
- django 模板层排序 class Meta 添加信息
class weeks(models.Model): #星期信息 stu = models.ForeignKey(students,on_delete=models.CASCADE) weeklist ...