ITeye博客

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

357029540 · 2016-01-19 22:26 · SPRING · 开源软件 · Spring · Markdown

在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就可以了。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。