spring-data-redis的坑

最近新开了一个项目在配置框架的时候采用了redis做缓存 

当引入spring-data-redis 2.0.5 版本时

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisCacheManager' defined in class path resource [conf/spring-jdbc.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.cache.RedisCacheWriter] - did you specify the correct bean references as arguments?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisCacheManager' defined in class path resource [conf/spring-jdbc.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.cache.RedisCacheWriter] - did you specify the correct bean references as arguments?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisCacheManager' defined in class path resource [conf/spring-jdbc.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.cache.RedisCacheWriter] - did you specify the correct bean references as arguments?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisCacheManager' defined in class path resource [conf/spring-jdbc.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.cache.RedisCacheWriter] - did you specify the correct bean references as arguments?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisCacheManager' defined in class path resource [conf/spring-jdbc.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.cache.RedisCacheWriter] - did you specify the correct bean references as arguments?
Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisCacheManager' defined in class path resource [conf/spring-jdbc.xml]: Unsatisfied dependency expressed through constructor parameter 0: Ambiguous argument values for parameter of type [org.springframework.data.redis.cache.RedisCacheWriter] - did you specify the correct bean references as arguments?
	...

一直在报配置参数错误

退回到1.6.0版本后自动消失

在查看api 后发现在2.0以上版本后更新了RedisCache的执行方式

你可能感兴趣的:(java)