https://edu.csdn.net/combo/detail/1230
在项目搭建过程中,配置Mybatis配置文件时,出现错误:在UserMapper.xml头文件出现 "Referenced file contains errors(file:/D:/config/mybatis-3-mapper.dtd). For more information, right click on the message in the Problems View and select "Show Details..." 的问题????
对于这个问题,出现问题的mapper.xml文件的头文件是
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://www.mybatis.org/dtd/mybatis-3-mapper.dtd">
可能是由于我自己使用的Mybatis的config配置文件—— mybatis-3-mapper.dtd文件版本较低,当我更换一个高版本的mybatis-3-mapper.dtd文件后,在Eclipse中重新加载mybatis-3-mapper.dtd文件,在 通过"Project ---> clear"项目后,错误消失,问题得以解决。
单击add
一般这个时候就好了,如果还没有好,到Project下,点击clear
这时候保存文件即可。
另外,也可以
将 "http://mybatis.org/dtd/mybatis-3-config.dtd"> 修改为
"http://www.mybatis.org/dtd/mybatis-3-config.dtd">
两个配置文件下载:
http://download.csdn.net/download/qq_25927221/9379957