Attribute "resource" must be declared for element type "mapper".
今天在玩mybatis的时候,遇到这个奇葩问题。
最后发现,原因是 dtd文件配置错误了。错把Mapper的直接copy过来
把DOCTYPE mapper改成configuration,Mapper改成config即可
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<configuration> <typeAliases>
<typeAlias alias="Jit" type="springmvcexample.demo.model.Jit"/>
</typeAliases> <!-- 注册对象的空间命名 -->
<environments default="development">
<environment id="development">
<transactionManager type="JDBC"/>
<dataSource type="POOLED">
<property name="driver" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://10.199.160.35:3306/vop_data_stg"/>
<property name="username" value="root"/>
<property name="password" value="test"/>
</dataSource>
</environment>
</environments> <mappers>
<mapper resource="jitMapper.xml" />
</mappers>
</configuration>
Attribute "resource" must be declared for element type "mapper".的更多相关文章
- 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 ...
- Attribute "resultType" must be declared for element type "insert"或"update"
Attribute "resultType" must be declared for element type "insert"或"update&q ...
- Attribute "not-null" must be declared for element type "property"解决办法
Attribute "not-null" must be declared for element type "property"解决办法 在hiberante ...
- Attribute "resultType" must be declared for element type "insert".
这是mybatis插入数据库之后出现的问题,至于为什么出现这个问题,是因为插入的时候你照抄了查询的语句,插入的时候只有id属性和parameterType属性,并没有“resultType”属性,要注 ...
- Attribute "resultType" must be declared for element type "update" or "insert"
仔细查看错误如图所示: 解决错误就是把resultType去掉,因为在insert和update语句中是没有返回值的.小坑小坑 转自:https://blog.csdn.net/u013144287/ ...
- Attribute name "aphmodel" associated with an element type "mxg" must be followed by the ' = ' charac
1.错误描述 org.apache.batik.transcoder.TranscoderException: null Enclosed Exception: Attribute name &quo ...
- namespace" 或The content of element type "mapper" must match "EMPTY"
必须为元素类型 "mapper" 声明属性 "namespace" 或The content of element type "mapper" ...
- Open quote is expected for attribute "property" associated with an element type "result".错误
java Mybatis 框架下的项目 报 Open quote is expected for attribute "property" associated with a ...
- [Fatal Error] :3:13: Open quote is expected for attribute "{1}" associated with an element type "id".
用DOM解析XML时出现了如下错误: [Fatal Error] :3:13: Open quote is expected for attribute "{1}" associa ...
随机推荐
- import和from import陷阱二
1 2 3 4 5 6 7 8 9 10 11 12 13 14 #from os import path import os.path path='/home/vamei/doc/file.txt' ...
- day13_API第三天
1.StringBuffer类(掌握) 1.概念 字符串缓冲区类 2.机制 StringBuffer采用的是缓冲区机制. 一开始,首先开辟一些空间,然后,随着数据的增多,还可以继续 ...
- 在windows环境下,为什么要用Notepad++编辑?
摘自廖雪峰的git教程之创建版本库 首先这里再明确一下,所有的版本控制系统,其实只能跟踪文本文件的改动,比如TXT文件,网页,所有的程序代码等等,Git也不例外.版本控制系统可以告诉你每次的改动,比如 ...
- mm/mmap.c
/* * linux/mm/mmap.c * * Written by obz. */#include <linux/stat.h>#include <linux/sched. ...
- 虚拟机VMBox的空间扩展和对加载进来资源的扩展
来源于:http://www.linuxidc.com/Linux/2015-01/111186.htm 其中有点bug就自己重新复制黏贴下 VirtualBox虚拟机在使用的过程中,有时会遇到磁盘大 ...
- Scrum2.0 项目基本完成
- 论文笔记之:Dueling Network Architectures for Deep Reinforcement Learning
Dueling Network Architectures for Deep Reinforcement Learning ICML 2016 Best Paper 摘要:本文的贡献点主要是在 DQN ...
- vb6 获取 http only 的 Cookie
Option Explicit ' No more data is available. ' The data area passed to a system call is too small. P ...
- 转载部长一篇大作:常用排序算法之JavaScript实现
转载部长一篇大作:常用排序算法之JavaScript实现 注:本文是转载实验室同门王部长的大作,找实习找工作在即,本文颇有用处!原文出处:http://www.cnblogs.com/ywang172 ...
- JavaScript引用方法说明
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...