Caused by: com.alicp.jetcache.CacheConfigException: PubSubConnection not set at com.alicp.jetcache.redis.lettuce.LettuceBroadcastManager.(LettuceBroadcastManager.java:43) ~[jetcache-redis-lettuce-2.7.0.jar:?] at com.alicp.jetcache.redis.lettuce.RedisLettuceCacheBuilder.createBroadcastManager(RedisLettuceCacheBuilder.java:43) ~[jetcache-redis-lettuce-2.7.0.jar:?] at com.alicp.jetcache.template.NotifyMonitorInstaller.addMonitors(NotifyMonitorInstaller.java:45) ~[jetcache-core-2.7.0.jar:?] at com.alicp.jetcache.SimpleCacheManager.create(SimpleCacheManager.java:148) ~[jetcache-core-2.7.0.jar:?] at com.alicp.jetcache.SimpleCacheManager.lambda$getOrCreateCache$4(SimpleCacheManager.java:110) ~[jetcache-core-2.7.0.jar:?] at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:1.8.0_221] at com.alicp.jetcache.SimpleCacheManager.getOrCreateCache(SimpleCacheManager.java:110) ~[jetcache-core-2.7.0.jar:?]
5条答案
按热度按时间zzlelutf1#
看文档,需要新版jedis。 spring-data默认用的lettuce,如果你的spring-data没用jedis可以自己手工把jedis升级一下。
wtzytmuj2#
按文档
https://github.com/alibaba/jetcache/blob/master/docs/CN/RedisWithLettuce.md
不使用spring boot 的配置
出现如下错误
Caused by: com.alicp.jetcache.CacheConfigException: PubSubConnection not set
at com.alicp.jetcache.redis.lettuce.LettuceBroadcastManager.(LettuceBroadcastManager.java:43) ~[jetcache-redis-lettuce-2.7.0.jar:?]
at com.alicp.jetcache.redis.lettuce.RedisLettuceCacheBuilder.createBroadcastManager(RedisLettuceCacheBuilder.java:43) ~[jetcache-redis-lettuce-2.7.0.jar:?]
at com.alicp.jetcache.template.NotifyMonitorInstaller.addMonitors(NotifyMonitorInstaller.java:45) ~[jetcache-core-2.7.0.jar:?]
at com.alicp.jetcache.SimpleCacheManager.create(SimpleCacheManager.java:148) ~[jetcache-core-2.7.0.jar:?]
at com.alicp.jetcache.SimpleCacheManager.lambda$getOrCreateCache$4(SimpleCacheManager.java:110) ~[jetcache-core-2.7.0.jar:?]
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[?:1.8.0_221]
at com.alicp.jetcache.SimpleCacheManager.getOrCreateCache(SimpleCacheManager.java:110) ~[jetcache-core-2.7.0.jar:?]
pkbketx93#
你用lettuce为什么会和spring boot冲突呢
v440hwme4#
后来换成普通spring 工程了。
5ssjco0h5#
发现问题了使用了lettuce后不能使用CacheManager
@Autowired
private CacheManager cacheManager;