在SpringMVC的XML文件中配置如
<mvc:default-servlet-handler/>
运行时,会报错
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:default-servlet-handler/
此时需要注意,SpringMVC中的xml文件xsi中是否包含这两个元素
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
加上这两个location后,即可执行成功。