最近一個java web工程中常出現xml檔案的xsd驗證失敗資訊,異常如下:
?
| 1 2 3 4 5 6 7 |
Multiple annotations found at this line: - Referenced file contains errors (http: //www.springframework.org/schema/beans/spring-beans-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (http: //www.springframework.org/schema/tool/spring-tool-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (http: //www.springframework.org/schema/context/spring-context-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." |
展開異常資訊: ?
| 1 |
The errors below were detected when validating the file "spring-beans-3.0.xsd" via the file "applicationContext-mongodb.xml" . In most cases these errors can be detected by validating "spring-beans-3.0.xsd" directly. However it is possible that errors will only occur when spring-beans- 3.0 .xsd is validated in the context of applicationContext-mongodb.xml. |
解決辦法就是將設定檔中的xsd檔案的版本號碼去掉。
原文檔: ?