diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketServerAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketServerAutoConfiguration.java index d493e6e64c..d4c59eb668 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketServerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketServerAutoConfiguration.java @@ -20,6 +20,7 @@ import java.util.stream.Collectors; import io.netty.buffer.PooledByteBufAllocator; import io.rsocket.RSocketFactory; +import io.rsocket.SocketAcceptor; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.AutoConfigureAfter; @@ -106,9 +107,8 @@ public class RSocketServerAutoConfiguration { @Bean public NettyRSocketBootstrap nettyRSocketBootstrap( RSocketServerFactory rSocketServerFactory, - MessageHandlerAcceptor messageHandlerAcceptor) { - return new NettyRSocketBootstrap(rSocketServerFactory, - messageHandlerAcceptor); + SocketAcceptor socketAcceptor) { + return new NettyRSocketBootstrap(rSocketServerFactory, socketAcceptor); } } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketBootstrap.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketBootstrap.java index 0c97dcb9c4..85e76011de 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketBootstrap.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketBootstrap.java @@ -16,13 +16,14 @@ package org.springframework.boot.rsocket.netty; +import io.rsocket.SocketAcceptor; + import org.springframework.boot.rsocket.context.RSocketServerInitializedEvent; import org.springframework.boot.rsocket.server.RSocketServer; import org.springframework.boot.rsocket.server.RSocketServerFactory; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; import org.springframework.context.SmartLifecycle; -import org.springframework.messaging.rsocket.MessageHandlerAcceptor; /** * Bootstrap an {@link RSocketServer} and start it with the application context. @@ -38,8 +39,8 @@ public class NettyRSocketBootstrap private ApplicationEventPublisher applicationEventPublisher; public NettyRSocketBootstrap(RSocketServerFactory serverFactoryProvider, - MessageHandlerAcceptor messageHandlerAcceptorProvider) { - this.rSocketServer = serverFactoryProvider.create(messageHandlerAcceptorProvider); + SocketAcceptor socketAcceptor) { + this.rSocketServer = serverFactoryProvider.create(socketAcceptor); } @Override