转载
https://blog.csdn.net/qq_35155205/article/details/68484580
spring启用注解扫描机制:加上这句话报:
1.The prefix “context” for element “context:annotation-config” is not bound.
看看spring头部属性是否缺少: xmlns:context=”http://www.springframework.org/schema/context”
2.如果报:The matching wildcard is strict, but no declaration can be found for element ‘context:annotation-config’.
xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd”