栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

cvc-complex-type.2.4.c:匹配的通配符是严格的,但是找不到元素'mvc:annotation-driven'的声明

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

cvc-complex-type.2.4.c:匹配的通配符是严格的,但是找不到元素'mvc:annotation-driven'的声明

如果查看架构位置,您会注意到其中包含的行

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

该行中断了预期的格式,该格式应为 [namespace] [xsd-location]
。这行基本上是在弄乱正确的格式。要解决此问题,请添加xsd位置或删除该行。为了防止这种情况,我通常也遵循xsi:schemaLocation属性的布局中的格式(如果您进行相应的格式化,则很明显该部分丢失了)。

 xsi:schemaLocation="    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd     http://www.springframework.org/schema/security    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

作为补充提示,建议使用无版本的xsd文件,而不要

spring-beans-4.0.xsd
使用
spring-beans.xsd

 xsi:schemaLocation="    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd     http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/405516.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号