【发布时间】:2018-07-06 13:33:57
【问题描述】:
我正在探索 spring mvc 框架中的缓存。按照here 或here 等互联网指南,我正在配置:
<?xml version='1.0' encoding='UTF-8' ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache.xsd">
<cache:annotation-driven />
... other configuration are omitted....
</beans>
在添加缓存配置之前,我的 Web 应用运行正常,现在,我的 Web 应用启动时出现错误:
java.lang.NoClassDefFoundError: org/springframework/cache/interceptor/CacheInterceptor
不知道我做错了什么?
【问题讨论】:
标签: java spring spring-mvc caching