1、在 mapper.xml文件里按住Ctrl+用鼠标点击(http://mybatis.org/dtd/mybatis-3-mapper.dtd),会自动下载dtd文件。
2、找到下载的dtd文件,把它保存到一个文件夹里。
3、打开eclipse,找到这个路径 : eclipse
window->preferences->xml->xml catalog-> add。
4、location: 找到刚才下载的DTD,你在电脑保存的位置。
5、key type:public ID
key: -//mybatis.org//DTD Mapper 3.0//EN(填写dtd文件中public 后的内容)
6、创建xml文件时选择Create XML file from a DTD file,点下一步
设置创建mybatis-config.xml和mybatis-mapper.xml文件时自动加入约束头

7、选择Select XML Catalog Entry,选中刚刚配好的catalog,点下一步
设置创建mybatis-config.xml和mybatis-mapper.xml文件时自动加入约束头

8、finish
设置创建mybatis-config.xml和mybatis-mapper.xml文件时自动加入约束头
9、大功告成,config同理

相关文章:

  • 2021-08-12
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-05-29
猜你喜欢
  • 2021-04-18
  • 2021-11-05
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2021-10-18
  • 2022-01-20
相关资源
相似解决方案