通配符的匹配很全面, 但无法找到元素 'context:property-placeholder' 的声明。
在Spring相应包导入正确的前提下,出现这个异常,是因为我们在引入命名空间的时候,没有正确引入它的DTD解析文件,以上面的context为例,解决办法如下:
在引入
xmlns:context="http://www.springframework.org/schema/context"
的同时,在xsi:schemaLocation这个字符串中添加context相关的解析文件:
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
如图:
需要注意的是,由于Spring版本的不同,图中划线的地方的数字可能会不同,我当前的是4.0,如果是其它版本,可能要换成其它数字(不写数字也可以)。
通配符的匹配很全面, 但无法找到元素 'context:property-placeholder' 的声明。的更多相关文章
- 关于spring”通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明“的错误
关于spring配置的问题 近日学习spring时遇到了这个问题: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExcept ...
- 通配符的匹配很全面, 但无法找到元素 'context:property-placeholder'
解决方案就是如下: xmlns:context="http://www.springframework.org/schema/context" 同时在xsi:schemaLocat ...
- 通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明。
错误原因: xml文件中,本来是要配置成下面这样的: http://www.springframework.org/schema/context http://www.springframework. ...
- Spring:通配符的匹配很全面, 但无法找到元素 XXXXX' 的声明
问题:配置Spring的时候容易发生如题的这样一个经常性的错误,错误如下(以context为例) org.springframework.beans.factory.xml.XmlBeanDefini ...
- springMVC:通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明
转自:http://blog.csdn.net/tolcf/article/details/50845483 报错信息:通配符的匹配很全面, 但无法找到元素 'mvc:annotation-drive ...
- nested exception is org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 56; cvc-complex-type.2.4.c通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明
严重: Exception sending context initialized event to listener instance of class org.springframework.we ...
- 通配符的匹配很全面, 但无法找到元素 'cache:advice' 的声明
EB-INF\classes\spring-jdbc.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineN ...
- idea调试SpringMvc, 出现:”通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明“错误的解决方法
调试json格式输出,出现以下错误: HTTP Status 500 - Servlet.init() for servlet HelloDispatcher threw exception ty ...
- 通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明
通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明 错误原因是springmvc中的约束信息不对 <beans xmlns="http://w ...
随机推荐
- 移动端-处理后台传过来的html中图片的显示
function DealWithImg() { var width = 0; if (window.screen.width) { width = window.screen.width; } el ...
- Timer定时方法(间隔时间后执行)
Timer time = new Timer(); time.schedule(new TimerTask() { @Override public void run() { // TODO Auto ...
- docker安装redis
查询镜像 docker search redis 拉取镜像 docker pull redis 启动容器 docker run --name redis -p 6379:6379 -d --resta ...
- 关于lnmp下 phalcon和tp框架下的nginx文件配置
vim /etc/nginx/sites-available/default 进入修改目录 1.正常项目配置 server { listen 80 default_server; listen [ ...
- java:构造方法:无参构造/有参构造 this static关键字 静态变量 静态方法 代码块 封装 静态常量。
/*构造方法是一种特殊的方法,专门用于构造/实例化对象,形式:[修饰符] 类名(){ }构造方法根据是否有参数分为无参构造和有参构造*/public class Dog { ...
- web---资源的下载及中文乱码问题
1.html网页,超链接交由Servlet处理 <!DOCTYPE html> <html lang="en"> <head> <meta ...
- linux下c通过虚拟地址映射读写文件的代码
在代码过程中中,把开发过程中比较好的一些代码片段记录起来,如下的代码内容是关于 linux下c通过虚拟地址映射读写文件的代码,应该对小伙伴有些好处.#include<stdio.h>#in ...
- Keil相关问题
1.keil重选则器件 2. 移植FREERTOS出错 .\Objects\RTOSDemo.axf: Error: L6406E: No space in execution regions wit ...
- python第一周总结
这一周将开启学习python第一周,开始之前学过python但是没有学精,到现在基本快忘记了,只能记住大概什么样子了emmm 作业计算bmi 这周作业为计算bmi,小明身高1.75,体重80.5.请根 ...
- word2vec并行实现小记
word2vec能将文本中出现的词向量化,其原理建立在Mikolov的博士论文成果及其在谷歌的研究经验的基础上.与潜在语义分析(Latent Semantic Index, LSI).潜在狄立克雷分配 ...