可能是版本号不对应(我是用的springboot版本是2.2.1.RELEASE),在使用
<dependency> <groupId>de.javakaffee</groupId> <artifactId>kryo-serializers</artifactId> <version>0.45</version> </dependency>
的时候服务提供者和消费者必须增加以下依赖:
<dependency> <groupId>com.esotericsoftware</groupId> <artifactId>kryo</artifactId> <version>4.0.2</version> </dependency>
否则会报错:
Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to send message Request Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.alibaba.dubbo.common.serialize.kryo.utils.KryoUtils
原文地址:https://www.cnblogs.com/sdu-Jumper/p/11939132.html
时间: 2024-10-16 05:44:46