【问题标题】:Getting error in web.xml for spring mvc projectspring mvc项目的web.xml中出现错误
【发布时间】:2018-06-04 05:28:13
【问题描述】:

我正在创建 Spring MVC 项目。

在 web.xml 中 <spring-class>org.springframework.web.servlet.DispatcherServlet</spring-class>

我收到这个错误

"cvc-complex-type.2.4.a: 发现无效内容以 元素“弹簧类”。之一 {"http://xmlns.jcp.org/xml/ns/javaee":servlet-class, "http:// xmlns.jcp.org/xml/ns/javaee":jsp-file, "http://xmlns.jcp.org/xml/ns/javaee":init- param, "http://xmlns.jcp.org/xml/ns/javaee":load-on-startup, "http://xmlns.jcp.org/ xml/ns/javaee":enabled, "http://xmlns.jcp.org/xml/ns/javaee":async-supported,
"http://xmlns.jcp.org/xml/ns/javaee":run-as, "http://xmlns.jcp.org/xml/ns/ javaee":security-role-ref, "http://xmlns.jcp.org/xml/ns/javaee":multipart-config}

预计。”

谁能帮我解决这个问题

【问题讨论】:

标签: java xml spring spring-mvc servlets


【解决方案1】:

如果没有发布完整的 web.xml,很难确定,但根据您发布的内容,我相信您的问题可能是连字符和类之间的空格。

你有'spring- class',但它应该是'spring-class'

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2011-12-27
  • 1970-01-01
  • 2012-05-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-19
  • 1970-01-01
相关资源
最近更新 更多