Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www
来源:互联网 发布:淘宝法院拍卖怎么查找 编辑:程序博客网 时间:2024/06/05 04:05
时间点:2017.12.01
问题:maven工程启动时报Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mvc]错误,一直无法解决。
module-context.xml文件内容如下:
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:context="http://www.springframework.org/schema/context"xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc.xsdhttp://code.alibabatech.com/schema/dubbohttp://code.alibabatech.com/schema/dubbo/dubbo.xsd"><context:component-scan base-package="com.sitech.cmap" /><!-- <aop:aspectj-autoproxy proxy-target-class="false" /> --><!-- 处理responseBody 里面日期类型 //在日期类型的get方法上添加 @JsonFormat(pattern="yyyy年MM月dd日 HH:mm:ss") 覆盖默认格式 --><mvc:annotation-driven><mvc:message-converters><beanclass="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"><property name="objectMapper"><bean class="com.fasterxml.jackson.databind.ObjectMapper"><property name="dateFormat"><bean class="java.text.SimpleDateFormat"><constructor-arg type="java.lang.String" value="yyyy-MM-dd HH:mm:ss" /></bean></property></bean></property></bean><bean class="org.springframework.http.converter.StringHttpMessageConverter"><property name="supportedMediaTypes"><list><value>text/plain; charset=UTF-8</value></list></property></bean><bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/></mvc:message-converters></mvc:annotation-driven> <!-- 支持上传文件 --> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/> </beans>
思路:1、刚开始以为是http://www.springframework.org/schema/mvc无法访问,但其实可以访问。
2、认为是缺少spring-mvc的jar包。在pom.xml中添加依赖,引用jar包,解决。
<dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>${spring.version}</version></dependency>参考:https://www.cnblogs.com/icewee/articles/3703491.html
阅读全文
0 0
- Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www
- Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www
- Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www
- spring报错Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/aop]
- Unable to locate Spring NamespaceHandler for XML schema namespace 【http://www.springframework.org/schema/context】
- Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace
- 【spring-security】Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.sprin
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/s
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/sc
- 三维视觉之基础矩阵
- c语言实现rsa nopadding非对称加密算法(openssl api方式),匹配java后端 bouncycastle
- HTML画布
- 思科防火墙
- extjs4 grid combobox 联动
- Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www
- 【iOS】Xcode9 自动化脚本打包
- DOM操作
- ORA-01940: cannot drop a user that is currently connected 的解决办法
- pdf在线转换图片该如何进行操作
- webview中的网页,超链接打电话,找不到网页
- 如何创建自己的开源依赖库(如何上传自己的依赖库library到jCenter)
- codeforces 873 C. Strange Game On Matrix【贪心】
- 分答项目_知识点:点击图片看大图