配置xml文件时,错误显示:
“cvc-complex-type.2.4.c: matching wildcard is strict, but no declaration can be found for element ‘context:component-scan’.”
原因是缺少:
xmlns:context="http://www.springframework.org/schema/context"
一般报这种错是缺少命名空间配置,具体查找方式:
以spring-aop-4.3.3.RELEASE.jar
为例
找到MET-INF这个文件夹
Spring.handlers
http\://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler
spring.schemas
http\://www.springframework.org/schema/aop/spring-aop-2.0