您的位置:首页 > 移动开发

配置Spring的applicationContext.xml文件时出现The prefix "context" for element "context:component-scan" is not

2017-03-30 11:12 441 查看
配置Spring的applicationContext.xml文件时出现错误:The prefix "context" for element "context:component-scan" is not bound.



解决办法:在文件中添加:

xmlns:context=http://www.springframework.org/schema/context

之后报错:cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.

解决办法:

在xsi:schemaLocation中添加:
http://www.springframework.org/schema/context    http://www.springframework.org/schema/context/spring-context.xsd
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐