在配置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. MySQL性能压力基准测试工具sysbench

    1.sysbench介绍 这里介绍一款MySQL数据库的压力测试软件sysbench,用它来进行基准测试. sysbench 是一个开源的.模块化的.跨平台的多线程性能测试工具, 可以用来进行CPU. ...

  2. dubbo负载均衡策略和集群容错策略都有哪些?动态代理策略呢?

    (1)dubbo负载均衡策略 1)random loadbalance 默认情况下,dubbo是random load balance随机调用实现负载均衡,可以对provider不同实例设置不同的权重 ...

  3. Vue Hello World

    1 Vue介绍 伟大的项目是从Hello World而来的,Hello World尽管没有什么实际性的作用,但是在于意义重大.(哈哈哈哈) 好了不废话了入正题. Vue是一套用于构建用户界面的渐进式J ...

  4. Redhat 安装gitlab

    以下为8月23日左右记录的,没有发布.今日整理大概记录下. 安装依赖包 yum install -y curl policycoreutils-python openssh-server openss ...

  5. 【学习底层原理系列】重读spring源码3-加载beanDefinition的方法obtainFreshBeanFactory

    obtainFreshBeanFactory()方法概述 定义BeanFactory,并加载以下两种bean的定义,装配到BeanFactory: 1.配置文件中定义的bean 2.通过<con ...

  6. Unix ls UVA - 400

      The computer company you work for is introducing a brand new computer line and is developing a new ...

  7. 这一篇文章帮你搞定Java(含Java全套资源)

    当下想学习Java开发的人越来越多,对于很多零基础的人来说,没有相关的视频教程及相关的学习线路,学起来是一件很费劲的事情,还有很多人从网上及其它渠道购买视频,这些视频资料的价格对于刚毕业的大学生来说也 ...

  8. PE文件附加数据感染之Worm.Win32.Agent.ayd病毒分析

    一.基本信息 样本名称:1q8JRgwDeGMofs.exe 病毒名称:Worm.Win32.Agent.ayd 文件大小:165384 字节 文件MD5:7EF5D0028997CB7DD3484A ...

  9. hdu3715 二分+2sat+建图

    题意:       给你一个递归公式,每多一层就多一个限制,问你最多能递归多少层. 思路:      先分析每一层的限制 x[a[i]] + x[b[i]] != c[i],这里面x[] = 0,1, ...

  10. 从苏宁电器到卡巴斯基第24篇:难忘的三年硕士时光 II

    没办法,还是先打好基础吧 其实在我知道自己面试失败后,第一个想法就是将面试官问我的问题都总结出来,然后通过查权威的资料,找出所有问题的答案,背下所有的答案,大概过一到两个月吧,再面试金山.当时我是这么 ...