spring boot 配置redis缓存

环境:spring boot+java8,spring版本为4以上
用spring boot 配置redis缓存时报错如下:
java.lang.IllegalStateException: No CacheResolver specified, and no unique bean of type CacheManager found. Mark one as primary (or give it the name 'cacheManager') or declare a specific CacheManager to use, that serves as the default one.
有哪位大神有遇到类似异常信息的,可否提供解决方案?

使用redis做缓存的思路是在spring的项目中配置拦截器,在service层做切面,在findXXX或者getXXX等方法上进行拦截判断是否缓存即可。

1.环境:spring 3.1.2 + spring data redis 1.0.0+ jedis 2.1.0

2.spring配置文件配置:
<!-- jedis 配置 -->
&lt......
答案就在这里:redis spring缓存配置
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

我今天配了一下 成功了呀 没有你遇到的问题 你怎么配置的 spring boot redis 网上有成功的案例的

http://m.blog.csdn.net/article/details?id=50483523。这个就可以的 我试过了成功的

原因是存在多个CacheManager,需要一个CacheManager作为默认,解决方法是在其中一个CacheManager上加上@Primary注解