Java 使用Spring缓存的依赖项

Java 使用Spring缓存的依赖项,java,spring,caching,dependencies,spring-3,Java,Spring,Caching,Dependencies,Spring 3,我想使用,但我不知道这个模块有什么依赖关系。我的配置如下: <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/

我想使用,但我不知道这个模块有什么依赖关系。我的配置如下:

<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 />
我认为这是因为我没有添加Spring模块的jar文件,因为我没有在真正需要的时候添加所有的jar文件

让spring缓存工作需要哪些spring模块JAR?或者在elast我在哪里可以找到这些信息

谢谢

您还需要:

xmlns:cache="http://www.springframework.org/schema/cache"
正确的xsd是:

http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
您还需要:

xmlns:cache="http://www.springframework.org/schema/cache"
正确的xsd是:

http://www.springframework.org/schema/cache/spring-cache-3.1.xsd

您是否了解此功能是Spring 3.1的一部分,它没有发布?是的


因此,您需要使用Spring JAR,它来自于

您是否了解此功能是Spring 3.1的一部分,但尚未发布?是的


因此,您需要使用来自

的Spring jars,我已经添加了它,尽管我的问题中没有包含它。肯定还有什么遗漏了,我想可能是一个jar文件,谢谢这个错误停止了。文档中说我有xsd,所以我认为它是错误的。还有一个问题。我是否应该将mvc xsd从spring-mvc-3.0.xsd更改为spring-mvc-3.1.xsd,因为文档中也提到了spring-mvc-3.0.xsd?实际上,这两个xsd都是正确的,但这一个是可以下载的,这样IDE就可以对其进行验证。我已经添加了它,尽管我的问题中没有包含它。肯定还有什么遗漏了,我想可能是一个jar文件,谢谢这个错误停止了。文档中说我有xsd,所以我认为它是错误的。还有一个问题。我是否应该将mvc xsd从spring-mvc-3.0.xsd更改为spring-mvc-3.1.xsd,因为文档中也提到了spring-mvc-3.0.xsd?实际上,这两个xsd都是正确的,但这一个是可以下载的,这样IDE就可以对其进行验证。@Javi:您在运行程序时,还是在IDE中,会遇到这个错误,我认为波佐的答案是正确的,尽管由于另一个原因,我根本没有检查它error@Javi:您是在运行程序时还是在IDE中遇到此错误?在IDE中,我认为Bozho的答案是正确的,尽管由于另一个错误,我根本没有检查它