【错误解决】The prefix "context" for element "context:component-scan" is not bound
在配置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的更多相关文章
- 解决The prefix 'context' for element 'context:component-scan' is not bound
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w ...
- The prefix "context" for element "context:component-scan" is not bound.
在beans里面加上下面信息: xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLo ...
- Spring配置文件标签报错:The prefix "XXX" for element "XXX:XXX" is not bound. .
例如:The prefix "context" for element "context:annotation-config" is not bound. 这种 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- nested exception is java.lang.IllegalStateException: Context namespace element 'annotation-config' a
公司还用的是spring低版本,今天用jre 8测试了一下,发现错误: Unexpected exception parsing XML document from class path resour ...
随机推荐
- 一个诡异的MySQL查询超时问题,居然隐藏着存在了两年的BUG
这一周线上碰到一个诡异的BUG. 线上有个定时任务,这个任务需要查询一个表几天范围内的一些数据做一些处理,每隔十分钟执行一次,直至成功. 通过日志发现,从凌晨5:26分开始到5:56任务执行了三次,三 ...
- Spring Boot 2.x 快速集成Kafka
1 Kafka Kafka是一个开源分布式的流处理平台,一种高吞吐量的分布式发布订阅消息系统,它可以处理消费者在网站中的所有动作流数据.Kafka由Scala和Java编写,2012年成为Apache ...
- 2.Python进程间的通信之队列(Queue)和生产者消费者模型
一.队列 1.1 概念介绍-----multiprocess.Queue 创建共享的进程队列,Queue是多进程安全的队列,可以使用Queue实现多进程之间的数据传递. Queue([maxsize] ...
- 做个开源博客学习Vite2 + Vue3 (三)博客设计和代码设计
项目搭建好了之后是不是可以编码了呢? 等等不要着急,我们是不是应该先设计一下?比如博客的功能等? 博客设计 先做个简单的个人博客,因为是个人版,所以可以省略注册.登录这些功能,表结构也可以简单一点. ...
- matlab逻辑类型
matlab逻辑类型 matlab逻辑表达式输出:1为真,0为假. matlab关系操作符: 关系操作符 说明 < 小于 <= 小于等于 > 大于 >= 大于等于 == 等于 ...
- 你已经用上 5G 网络了吗?
随着各大手机厂商陆续推出 5G 手机,智能手机全面迎来 5G 浪潮.可能有人会发问:如此推崇 5G,5G 能为我们带来什么,我们的生活又会因此而改变多大呢? 什么是 5G? 简单地说,5G 就是第五代 ...
- hdu4814 模拟(黄金分割进制转换)
题意: 给你一个十进制数,让你把他转化成Q进制数,Q是黄金分割比 = (1+√5)/2. 思路: 首先要明确的就是虽然q是实数,但是依然可以转换成q进制数,因为任何数num, ...
- Windows PE导出表编程4(重构导出表实现私有函数导出)
本次是尝试调用DLL里面的私有函数. 一: 之前先探索一下,首先可以考虑用偏移量来调用,就是如果知道了某个私有函数和某个导出的公共函数的相对便宜的话,直接加载dll获取公共函数地址,然后自己手动去偏移 ...
- 预防NSA勒索病毒攻击脚本
预防445端口勒索病毒修复脚本 直接复制下去,创建一个文件,名字随意后缀是.bat,然后双击就可以了(如果提示拒绝访问,就直接右键管理员,尤其是Win8 Win10). :+添加关键注册表以及停掉并且 ...
- 【python】Leetcode每日一题-旋转链表
[python]Leetcode每日一题-旋转链表 [题目描述] 给你一个链表的头节点 head ,旋转链表,将链表每个节点向右移动 k 个位置. 示例1: 输入:head = [1,2,3,4,5] ...