在配置spring相关的applicationContext.xml文件时报以上错误

原因是缺失context的namespace。

http://www.springframework.org/schema/context

同时后面的 xsi:schemaLocation也要加上

 http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd

比较全的namespace如下:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.0.xsd">
</beans>

【错误解决】The prefix "context" for element "context:component-scan" is not bound的更多相关文章

  1. 解决The prefix 'context' for element 'context:component-scan' is not bound

    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w ...

  2. The prefix "context" for element "context:component-scan" is not bound.

    在beans里面加上下面信息: xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLo ...

  3. Spring配置文件标签报错:The prefix "XXX" for element "XXX:XXX" is not bound. .

    例如:The prefix "context" for element "context:annotation-config" is not bound. 这种 ...

  4. Spring 错误 cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'.

    我来说下这个出错的原因吧 eclise中xsd的验证问题Description Resource Path Location Type cvc-complex-type.2.4.c: The matc ...

  5. spring 2.5.6 错误:Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

    在运行一个第三方公司交付的项目的时候, 出现: Caused by: java.lang.IllegalStateException: Context namespace element 'annot ...

  6. Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

    异常信息如下: 错误: Unexpected exception parsing XML document from class path resource [spring/applicationCo ...

  7. Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher

    Context namespace element 'annotation-config' and its parser class [org.springframework.context.anno ...

  8. spring低版本报错:java.lang.IllegalStateException: Context namespace element ‘annotation-config’ and its parser class [*] are only available on

    参考来源:http://blog.csdn.net/sunxiaoyu94/article/details/50492083 使用spring低版本(2.5.6),使用jre 8发现错误: Unexp ...

  9. nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' a

    公司还用的是spring低版本,今天用jre 8测试了一下,发现错误: Unexpected exception parsing XML document from class path resour ...

随机推荐

  1. 【macOS】显示/隐藏 允许“任何来源”的应用

    问题产生 在macOS中安装某些版本软件时会提示: "xxx"已损坏,打不开.您应该将它移动到废纸篓. 某些情况下实际上并不是软件已损坏,而是因为macOS对于开发者的验证导致软件 ...

  2. 【笔记】《Redis设计与实现》chapter2 简单动态字符串

    ------------恢复内容开始------------ 2.1 SDS的定义 struct sdshdr{ // 记录buf数组中已使用字节的数量 // 等于SDS所保存字符串的长度(不含'\0 ...

  3. php图片合成【png图片】

    php 图片合成[png图片] 示例代码 <?php header("Content-type:text/html;charset=utf-8"); error_report ...

  4. PHP--date转成时间戳,time()获取的是秒数

    date("Y-m-d H:i:s");  //如果存成datetime型在MYSQL中 必须用这种格式 实现功能:获取某个日期的时间戳,或获取某个时间的时间戳.strtotime ...

  5. linux 安装rabbitMQ详细教程

    经过第一次的安装失败, 第二次总算是成功了, 这里总结一下. 第一步:下载版本对应的rpm安装包 1. 下载Erlang安装包:RabbitMQ是Erlang语言编写,所以Erang环境必须要有,注: ...

  6. 【Nginx(一)】Centos下 Nginx环境搭建

    Nginx环境搭建 系统环境: 腾讯云 Linux Centos7 1.下载nginx压缩包 ,上传到腾讯云服务器 http://nginx.org/en/download.html 或者使用dock ...

  7. 【小白向】基于Docker使用Gogs,Drone以及drone-runner-docker的自动化部署

    Gogs是基于Go语言编写的可以替代gitlab的代码托管平台,它没有gitlab那么庞大且不需要占用大量资源,对小型服务器相对于比较友好,我们甚至可以使用树莓派搭建. 服务器配置: * 操作系统:C ...

  8. 关于Hexo博客NEXT主题(Gmini)站点图标不显示,显示错误的解决办法

    关于Hexo博客NEXT主题(Gmini)站点图标不显示,显示错误的解决办法   最近闲着没事自己利用Hexo和Github搭了个博客,但是在NEXT(Gmini)主题优化时,出了很多错误,图标不显示 ...

  9. node-util

    Node.js 常用工具 util 是一个Node.js 核心模块,提供常用函数的集合,用于弥补核心JavaScript 的功能 过于精简的不足. util.inherits util.inherit ...

  10. JVM虚拟机-了解Java堆中对象分配、布局和访问的全过程

    目录 前言 对象的创建 类加载检查 分配内存 内存空间分配方式 指针碰撞 空闲列表 并发时的内存分配 同步处理:CAS 本地线程分配缓冲:TLAB 初始化零值 设置对象头 执行 init 方法 对象的 ...