“cvc-complex-type.2.4.c: matching wildcard is strict, but no declaration can be found for element "

当遇到“cvc-complex-type.2.4.c: matching wildcard is strict, but no declaration can be found for element ‘context:component-scan’”的错误时,通常是由于缺少命名空间配置。Spring通过EntityResolver查找本地的spring.schemas文件映射XSD。如果XSD URL带有不匹配的版本号,Spring将尝试从公网加载,导致失败。解决方案包括避免在XML中指定版本号或自建服务器托管XSD文件。" 50354148,4752125,Android FragmentArguments实践:列表详情同步,"['Android开发', 'Fragment', '设计模式']
摘要由CSDN通过智能技术生成

配置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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值