1.将xsd文件考本到本地
2.xml catalog中进行配置
eclipse中xml校验中有如下错误,但是项目启动和访问都是正常的,错误信息如下,
Multiple annotations found at this line:
- Referenced file contains errors (http://www.springframework.org/schema/context/spring-context.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/mvc/spring-mvc.xsd). For more information, right click on the message in the Problems
View and select "Show Details..."
解决办法: 在xml的最外层加上xml-body 标签,具体原因不清楚,古此处特作记录