0%

web.xml里报错

最近研究SpringMVC和Mybatis整合,写web.xml文件的时候标签报了莫名其妙的错误:

Description ResourcePathLocationType
cvc-complex-type.2.4.a: Invalid content was found starting with element ‘init-param’. One of ‘{“http://Java.sun.com/xml/ns/javaee":enabled, “http://java.sun.com/xml/ns/javaee":async-supported, “http://java.sun.com/xml/ns/javaee":run-as, “http://java.sun.com/xml/ns/javaee":security-role-ref, “http://java.sun.com/xml/ns/javaee":multipart-config}' is expected.web.xml/WebContent/WEB-INFline 40XML Problem

查了一下才发现是必须放在1之前,XML文件的顺序是非常重要的说。