MyBatis的配置文件提示相關dtd文件未找到


問題:The file cannot be validated as the XML definition "D:\xx\xx\(系統找不到指定的路徑。)" that is specified as describing the syntax of the file  cannot be located.

解決方法:

以配置mapper文件為例"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

1、引入的jar包為mybatis-3.2.2.jar,引入后工程里面有mybatis-3-mapper.dtd文件,其路徑為mybatis-3.2.2.jar1\org\apache\ibatis\builder\xml

2、復制http://mybatis.org/dtd/mybatis-3-mapper.dtd,然后到MyEclipse中,打開windows —Preference  —   XML   —  XML  Catalog —選擇右邊欄中的 Add  按鈕,—  Key Type 選擇  URI,Key  中粘貼剛才引號中內容  —然后點擊   File System   按鈕,找到我們解壓出來那個  mybatis-3-config.dtd   文件  ->  然后就是  OK確定,->  到 eclipse 中,關閉掉 xml文件后再次打開,然后Alt  + /  ,會出現所有的標簽屬性提示!!!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM