文件后綴為.xml里如下一行報錯“The markup declarations contained or pointed to by the document type declaration must be well-formed.”
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
外部“http://mybatis.org/dtd/mybatis-3-mapper.dtd”在瀏覽器里是能打開下載的,但是本地服務啟動項目,需要將其下載下來,再導入到eclipse里。eclipse如何導入dtd步驟如下:
1、Eclipse中打開window-->Preferences-->XML-->XML catalog --> add
2、location 選擇 file system,然后選擇你的本地dtd文件。
3、key type 選擇 Public ID。
4、key 填入上述行中用綠色標注的值。 [“eclipse如何導入dtd”的更為詳細解答:https://www.cnblogs.com/wangmingshun/p/5675952.html]

