配置xml离线约束文件及xml校验报错

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 标签,具体原因不清楚,古此处特作记录

 

posted @ 2019-08-12 21:58  larry_zhu  阅读(95)  评论(0)    收藏  举报