Referenced file contains errors
(http://www.springframework.org/schema/context/spring-context-3.1.xsd).
For more information, right click on the message in
the Problems View and select "Show Details..."
解決辦法1:
在<?xml version="1.0" encoding="UTF-8"?>
下面加上<xml-body></xml-body>,等builder 完畢后再去掉,OK
解決辦法2:
將 Preferences > XML > XML Files > Validation中"Honour all XML schema locations"前的對號去掉。它將禁用指向不同schema位置相同命名空間引用的驗證,僅以第一次找到的可驗證的XML文件為結果。
解決辦法3:
點擊eclipse左上角菜單欄 Project->clean 清理一下你所出現問題的項目。不僅這個問題,還有很多奇怪的問題都可以通過這種方式解決
解決辦法4:
首先為了確保 Eclipse 可以從遠程拿到 xsd 文件,到 Window -> Preferences -> General -> Network Connections -> Cache 下的 Cache entries 框內檢查所需要的文件是否正確,如果不確定,就點擊 "Remove All",然后右擊當前的 Project 選擇 Validator,Eclipse 會重新加載 xsd 文件;
Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd', because 1) could
not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:interceptors'.