如果查看架构位置,您会注意到其中包含的行
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">



