`
357029540
  • 浏览: 725284 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

通配符的匹配很全面, 但无法找到元素 'context:property-placeholder' 的声明

阅读更多
在Spring配置文件中出现通配符的匹配很全面, 但无法找到元素 'context:property-placeholder' 的声明这个错误,其实主要是我们在引入命名空间时没有正确引入它的DTD解析文件,当然你必须在把Spring相应的包导入正确的情况下。
  解决方案就是如下:
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。
其他的如util命名空间导入方式一样,只是把context换成相应util就可以了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics