Java <;mvc:注释驱动/>;显示编译时错误
这是我的模式声明。但是mvc:注释驱动,它显示编译时错误。 匹配的通配符是严格的,但找不到元素的声明。我没能正确地找到问题。所以请帮我找到这个问题 错误: cvc复杂类型.2.4.c:匹配的通配符是严格的,但找不到元素“mvc:注释驱动”的声明。Java <;mvc:注释驱动/>;显示编译时错误,java,spring,jakarta-ee,spring-mvc,spring-webflow,Java,Spring,Jakarta Ee,Spring Mvc,Spring Webflow,这是我的模式声明。但是mvc:注释驱动,它显示编译时错误。 匹配的通配符是严格的,但找不到元素的声明。我没能正确地找到问题。所以请帮我找到这个问题 错误: cvc复杂类型.2.4.c:匹配的通配符是严格的,但找不到元素“mvc:注释驱动”的声明。 您能告诉我问题出在哪里吗?您的类路径中可能缺少spring webmvc-*.jar文件。您的类路径中可能缺少spring webmvc-*.jar文件。刚刚创建了这个: <beans xmlns="http://www.springfr
您能告诉我问题出在哪里吗?您的类路径中可能缺少spring webmvc-*.jar文件。您的类路径中可能缺少spring webmvc-*.jar文件。刚刚创建了这个:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd"
>
这显示0没有错误,所以实际上这是因为@Biju Kunjummen(+1)缺少spring mvc jar
另外,您可能有两个不同版本的spring mvc…刚刚创建了以下内容:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd"
>
这显示0没有错误,所以实际上这是因为@Biju Kunjummen(+1)缺少spring mvc jar
另外,您可能有两个不同版本的spring mvc…此标记显示错误。。。但它没有显示任何错误。请看这个。给出解决方案。。此标记显示错误。。。但它没有显示任何错误。请看这个。给出解决方案。org.springframework.web-3.0.6.RELEASE.jar,org.springframework.web.servlet-3.0.6.RELEASE.jar,但我有两个jar。。这就够了。对..我不确定什么是SpringWebServlet,但当我运行这个主方法时,您需要添加这个。我在线程“main thread”org.springframework.beans.factory.BeanDefinitionStoreException中遇到异常。甚至我给出了绝对路径…org.springframework.web-3.0.6.RELEASE.jar,org.springframework.web.servlet-3.0.6.RELEASE.jar,但我有两个jar。。这就够了。对..我不确定什么是SpringWebServlet,但当我运行这个主方法时,您需要添加这个。我在线程“main thread”org.springframework.beans.factory.BeanDefinitionStoreException中遇到异常。即使我给出了绝对路径。。。
public static void main(String[] args) {
System.out.println( new ClassPathXmlApplicationContext("1.xml").getBeanDefinitionCount() );
}