Jav*_*avi 1 java spring dependencies caching spring-3
我想使用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 />
Run Code Online (Sandbox Code Playgroud)
但是<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'
Run Code Online (Sandbox Code Playgroud)
我认为这是因为我没有Spring模块的jar文件,因为我没有添加所有(我真正需要它时添加它们).
要使Spring Cache工作,需要哪些弹簧模块罐?或者我可以在哪里找到这些信息?
谢谢
你还需要:
xmlns:cache="http://www.springframework.org/schema/cache"
Run Code Online (Sandbox Code Playgroud)
正确的xsd是:
http://www.springframework.org/schema/cache/spring-cache-3.1.xsd
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7263 次 |
| 最近记录: |