我使用春3.0.5.RELEASE 今天用Maven构建项目时,我得到以下错误在appicationContext.xml文件:无法加载弹簧3种模式
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element
'context:component-scan'.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:annotation-
config'.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'tx:annotation-
driven'.
我试图打开该架构链接:
- Spring XML Beans Schema
- Spring Framework's declarative transaction management infrastructure
- Spring Framework's application context support
,但我总是得到页紫禁城!
这里就是我如何配置的applicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
请告知如何解决这个错误。
是的,我将其定义明确,我编辑我的答案,我使用这种方法很长一段时间,但它今天停止工作,我不知道为什么。 –
@Msaleh:看到我指的链接,你不是唯一的。 –