Eclipse中mybatis的xml文件没有提示,出现the file cannot be validated as the XML definition.....

1.下载dtd文件

2.在eclipse中配置本地dtd文件:

  Window->Preferences->XML->XML Catalog->User Specified Entries->Add->location(本地dtd文件所在的位置)->key type(public Id)->key(选择xml文件声明中的public key,例如-//mybatis.org//DTD Config 3.0//EN)->Alternative web address(这个选择dtd的weburl,即本地dtd不存在时回去web上去找dtd 如: http://www.mybatis.org/dtd/mybatis-3-config.dtd)

3.确定,重启eclipse就好了

posted on 2017-05-18 11:29  斜月三星一太阳  阅读(689)  评论(0编辑  收藏  举报