SpringMVC:no declaration can be found for element 'mvc:annotation-driver'和 'context:component-scan'.
来源:互联网 发布:2017网络流行词语大全 编辑:程序博客网 时间:2024/06/08 05:13
问题一:cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.
解决办法:
beans 中增加绿色部分的context、spring-context。 具体引用可查看spring-context-4.3.5.RELEASE.jar下的META-INF/spring-schemas文件。
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
配置: <context:component-scan base-package="com.demo.controller" />
问题二:
1、cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:annotation-driver'.
解决办法:增加如下绿色部分XML schemes
2、cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明。
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
阅读全文
0 0
- SpringMVC:no declaration can be found for element 'mvc:annotation-driver'和 'context:component-scan'.
- no declaration can be found for element 'context:component-scan'
- org.xml.sax.SAXParseException:no declaration can be found for element 'context:component-scan'
- MyBatis-Spring(二)中的no declaration can be found for element 'context:annotation-con
- no declaration can be found for element mvc resources
- no declaration can be found for element 'mvc:interceptors'.
- but no declaration can be found for element 'mvc:resources'(springmvc 常见错误)
- SpringMVC: can be found for element 'mvc:annotation-driven'
- matching wildcard is strict, but no declaration can be found for element for<context:property-plac
- Spring: but no declaration can be found for element 'tx:annotation-driven'
- 关于"no declaration can be found for element 'mvc:default-servlet-handler"的问题分析
- no declaration can be found for element 'aop:config'
- but no declaration can be found for element 'tx:advice'
- , but no declaration can be found for element 'dubbo:application'.
- mvc:annotation-scan和context:component-scan
- spring使用AOP时the prefix aop for element is not bound.和no declaration can be found错误
- Spring MVC: <context:annotation-config> 和 <context:component-scan>区别
- but no declaration can be found for element 'authentication-manager'的一种解决办法
- LibSVM
- 下拉列表控件Spinner(1)
- centos7下破解安装JIRA 7.2
- C++之operator关键字[转]
- VPS必知必会
- SpringMVC:no declaration can be found for element 'mvc:annotation-driver'和 'context:component-scan'.
- 原生js来实现对dom元素class的操作方法
- 第三章 给自学者和JAVA培训机构学员的朋友的建议(怎样获得学习资料)
- 菜鸟Python(2)
- opencv12-计算物体旋转角度
- 收集Android方方面面的经典知识, 最新技术.
- android广告SDK原理详解(附源码)
- 【HDU 6127 Hard challenge】& 斜率
- 为什么越来越多的公司在使用Spark Streaming