问答详情
源自:4-1 Spring Bean装配之Bean的定义及作用域的注解实现

注解测试报错的问题

请大家帮忙看看:

https://img1.mukewang.com/5bbec49800011b8f05320047.jpg

网上说我这是因为xml命名空间没有写全,但是我是写全了的,为什么还是会出现这个问题?


谢谢大家啦!!


提问者:Serena_Cecilia 2018-10-11 11:34

个回答

  • 慕少0252165
    2018-10-11 15:58:47

    <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"

        xmlns:aop="http://www.springframework.org/schema/aop"

        xsi:schemaLocation="http://www.springframework.org/schema/beans 

            http://www.springframework.org/schema/beans/spring-beans.xsd  

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

            http://www.springframework.org/schema/context/spring-context.xsd

            http://www.springframework.org/schema/aop 

            http://www.springframework.org/schema/aop/spring-aop.xsd">


  • 驱魔鮔
    2018-10-11 15:57:37

    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-4.1.xsd

    要有这两条语句吧