解决BUG:java.lang.IllegalStateException: No CacheResolver specified, and no unique bean of type CacheM
BUG: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 CacheMana
·
BUG:
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.
解决方法:两个cacheManager要再一个上面加@Primary
使用spring-data-redis自定义配置CacheManager,配了两个,启动报错。
报错堆栈翻译过来就是,要指定一个默认的,或者在所有使用的地方都指明用哪个cacheManager
采用@Primary指定一个常用的cacheManger比较好
更多推荐
已为社区贡献5条内容
所有评论(0)