我想使用Spring Cache features,但我不知道此模塊具有哪些依賴關係。我有這樣的配置:使用Spring Cache的依賴關係
<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:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
...
<mvc:annotation-driven />
<cache:annotation-driven />
但<cache:annotation-driven />
沒有被認可。它給出了這樣的錯誤:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'cache:annotation-driven'
我想談到,因爲我沒有一個Spring模塊的JAR文件,因爲我沒有加入所有的(我加入他們,當我真正需要它們)。
需要什麼彈簧模塊的罐子來獲得Spring Cache的工作?或彈性體我在哪裏可以找到這些信息?
感謝
我已經又增加了它春瓶,雖然我還沒有包括在我的問題。必須有更多的東西丟失(我認爲它可能是一個jar文件) – Javi 2011-03-07 14:11:35
@Javi看到更新 – Bozho 2011-03-07 14:13:08
謝謝,錯誤停止。 http://static.springsource.org/spring/docs/3.1.0.M1/spring-framework-reference/html/cache.html中的文檔說我有xsd,所以我認爲它是錯誤的。還有一個問題。我應該將mvc xsd從spring-mvc-3.0.xsd更改爲spring-mvc-3.1.xsd(因爲文檔中還提到了spring-mvc-3.0.xsd)? – Javi 2011-03-07 15:25:51