Spring中Annotation装配/注入 出现元素 “context:annotation-config” 的前缀 “context” 未绑定这个错误。

是xml命名空间出现了问题。我出现这个问题将命名空间改为以下,解决了该问题。

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        https://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        https://www.springframework.org/schema/context/spring-context.xsd">

 

 

摘自/感谢:https://blog.csdn.net/weixin_42040292/article/details/103981113

posted @ 2020-11-07 17:14  小庄的blog  阅读(208)  评论(0编辑  收藏  举报