多个缓存配置找报错

来源:互联网 发布:ubuntu 14.10 samba 编辑:程序博客网 时间:2024/05/29 09:29

环境:

spring boot +redis +ehcache

加上ehcache的缓存后报错

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.

解决办法是在主管理器上加上@Primary注解 即可




0 0