【无标题】

SpringBoot项目集成Redisson,测试出现异常Could not initialize class org.redisson.spring.data.connection.RedissonConnection
at :

java.lang.NoClassDefFoundError: Could not initialize class org.redisson.spring.data.connection.RedissonConnection
at org.redisson.spring.data.connection.RedissonConnectionFactory.getConnection(RedissonConnectionFactory.java:113)
at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)
at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)
at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:211)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:191)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)
at org.springframework.data.redis.core.DefaultHashOperations.entries(DefaultHashOperations.java:30

解决:
1、排查SpringBoot版本和Redisson是否匹配;
2、排查存储数据到缓存时,是否能存储;
3、排查是否能读取存储的缓存数据;
出现场景:
1、本地测试没问题,部署到Linux环境,无法调用Redis数据库进行增删改查操作;
2、使用配置类引入客户端时,出现冲突,导致服务内部异常,无日志输出,但访问拦截器过滤的指定接口时出现无法访问;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值