(转) https://blog.csdn.net/mengmengdastyle/article/details/80943890
报错:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element ‘mvc:cors’.
引起原因:
我在spring-mvc.xml文件中添加了下列代码,出现的报错
<mvc:cors>
<mvc:mapping path="/**" />
</mvc:cors>
- 1
- 2
- 3
原因:
- eclipse中xsd的验证问题Description Resource Path Location Type cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for
解决方法:
将xsi:schemaLocation中的
http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
改为
http://www.springframework.org/schema/mvc/spring-mvc.xsd
即可