方法1
關閉XML驗證
工具欄:windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:選擇Ignore即可。
方法2
添加 內容如下
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/2002/xmlspec/dtd/2.10/xmlspec.dtd">
方法3(spring配置文件會報錯)
添加 內容如下
<!DOCTYPE xml>