Skip to content

Commit 8f84147

Browse files
committed
Fix deprecations after Reactor Netty upgrade
1 parent 77b9dd9 commit 8f84147

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private ServerTransport<CloseableChannel> createTransport() {
138138
private ServerTransport<CloseableChannel> createWebSocketTransport() {
139139
if (this.resourceFactory != null) {
140140
HttpServer httpServer = HttpServer.create().tcpConfiguration((tcpServer) -> tcpServer
141-
.runOn(this.resourceFactory.getLoopResources()).addressSupplier(this::getListenAddress));
141+
.runOn(this.resourceFactory.getLoopResources()).bindAddress(this::getListenAddress));
142142
return WebsocketServerTransport.create(httpServer);
143143
}
144144
return WebsocketServerTransport.create(getListenAddress());
@@ -147,7 +147,7 @@ private ServerTransport<CloseableChannel> createWebSocketTransport() {
147147
private ServerTransport<CloseableChannel> createTcpTransport() {
148148
if (this.resourceFactory != null) {
149149
TcpServer tcpServer = TcpServer.create().runOn(this.resourceFactory.getLoopResources())
150-
.addressSupplier(this::getListenAddress);
150+
.bindAddress(this::getListenAddress);
151151
return TcpServerTransport.create(tcpServer);
152152
}
153153
return TcpServerTransport.create(getListenAddress());

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ private HttpServer createHttpServer() {
155155
if (this.resourceFactory != null) {
156156
LoopResources resources = this.resourceFactory.getLoopResources();
157157
Assert.notNull(resources, "No LoopResources: is ReactorResourceFactory not initialized yet?");
158-
server = server.tcpConfiguration(
159-
(tcpServer) -> tcpServer.runOn(resources).addressSupplier(this::getListenAddress));
158+
server = server
159+
.tcpConfiguration((tcpServer) -> tcpServer.runOn(resources).bindAddress(this::getListenAddress));
160160
}
161161
else {
162-
server = server.tcpConfiguration((tcpServer) -> tcpServer.addressSupplier(this::getListenAddress));
162+
server = server.tcpConfiguration((tcpServer) -> tcpServer.bindAddress(this::getListenAddress));
163163
}
164164
if (getSsl() != null && getSsl().isEnabled()) {
165165
SslServerCustomizer sslServerCustomizer = new SslServerCustomizer(getSsl(), getHttp2(),

0 commit comments

Comments
 (0)