diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java index d75725e68d..18ac9811b3 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import io.netty.handler.ssl.util.InsecureTrustManagerFactory; import reactor.core.publisher.Mono; import reactor.netty.http.Http11SslContextSpec; import reactor.netty.http.client.HttpClient; +import reactor.netty.tcp.SslProvider.GenericSslContextSpec; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException; @@ -69,7 +70,7 @@ class ReactiveCloudFoundrySecurityService { return new ReactorClientHttpConnector(client); } - private Http11SslContextSpec createSslContextSpec() { + private GenericSslContextSpec createSslContextSpec() { return Http11SslContextSpec.forClient() .configure((builder) -> builder.sslProvider(SslProvider.JDK) .trustManager(InsecureTrustManagerFactory.INSTANCE)); diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 9acb282ee8..3fa028b346 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1680,7 +1680,7 @@ bom { ] } } - library("Reactor Bom", "2023.0.8") { + library("Reactor Bom", "2024.0.0-M3") { considerSnapshots() calendarName = "Reactor" group("io.projectreactor") { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactory.java index 5cbf17704f..093277148b 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactory.java @@ -33,7 +33,7 @@ import io.rsocket.transport.netty.server.TcpServerTransport; import io.rsocket.transport.netty.server.WebsocketServerTransport; import reactor.core.publisher.Mono; import reactor.netty.http.server.HttpServer; -import reactor.netty.tcp.AbstractProtocolSslContextSpec; +import reactor.netty.tcp.SslProvider.GenericSslContextSpec; import reactor.netty.tcp.TcpServer; import org.springframework.boot.context.properties.PropertyMapper; @@ -234,7 +234,7 @@ public class NettyRSocketServerFactory implements RSocketServerFactory, Configur } private TcpServer apply(TcpServer server) { - AbstractProtocolSslContextSpec sslContextSpec = createSslContextSpec(this.sslBundle); + GenericSslContextSpec sslContextSpec = createSslContextSpec(this.sslBundle); return server.secure((spec) -> spec.sslContext(sslContextSpec)); } diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/SslServerCustomizer.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/SslServerCustomizer.java index 3ac01f04bf..8bfda0671c 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/SslServerCustomizer.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/SslServerCustomizer.java @@ -27,6 +27,7 @@ import reactor.netty.http.Http2SslContextSpec; import reactor.netty.http.server.HttpServer; import reactor.netty.tcp.AbstractProtocolSslContextSpec; import reactor.netty.tcp.SslProvider; +import reactor.netty.tcp.SslProvider.GenericSslContextSpec; import reactor.netty.tcp.SslProvider.SslContextSpec; import org.springframework.boot.ssl.SslBundle; @@ -102,7 +103,7 @@ public class SslServerCustomizer implements NettyServerCustomizer { } private SslProvider createSslProvider(SslBundle sslBundle) { - return SslProvider.builder().sslContext(createSslContextSpec(sslBundle)).build(); + return SslProvider.builder().sslContext((GenericSslContextSpec) createSslContextSpec(sslBundle)).build(); } /** diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java index 0c1f8196b2..424cfc4fab 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/rsocket/netty/NettyRSocketServerFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,6 +39,7 @@ import org.mockito.InOrder; import reactor.core.publisher.Mono; import reactor.netty.http.Http11SslContextSpec; import reactor.netty.http.client.HttpClient; +import reactor.netty.tcp.SslProvider.GenericSslContextSpec; import reactor.netty.tcp.TcpClient; import reactor.test.StepVerifier; @@ -349,7 +350,7 @@ class NettyRSocketServerFactoryTests { private HttpClient createSecureHttpClient() { HttpClient httpClient = createHttpClient(); - Http11SslContextSpec sslContextSpec = Http11SslContextSpec.forClient() + GenericSslContextSpec sslContextSpec = Http11SslContextSpec.forClient() .configure((builder) -> builder.sslProvider(SslProvider.JDK) .trustManager(InsecureTrustManagerFactory.INSTANCE)); return httpClient.secure((spec) -> spec.sslContext(sslContextSpec)); @@ -363,7 +364,7 @@ class NettyRSocketServerFactoryTests { private TcpClient createSecureTcpClient() { TcpClient tcpClient = createTcpClient(); - Http11SslContextSpec sslContextSpec = Http11SslContextSpec.forClient() + GenericSslContextSpec sslContextSpec = Http11SslContextSpec.forClient() .configure((builder) -> builder.sslProvider(SslProvider.JDK) .trustManager(InsecureTrustManagerFactory.INSTANCE)); return tcpClient.secure((spec) -> spec.sslContext(sslContextSpec)); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java index 116e21e01f..f9a7fb7c8c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java @@ -52,6 +52,7 @@ import reactor.core.publisher.Sinks; import reactor.netty.NettyPipeline; import reactor.netty.http.Http11SslContextSpec; import reactor.netty.http.client.HttpClient; +import reactor.netty.tcp.SslProvider.GenericSslContextSpec; import reactor.test.StepVerifier; import org.springframework.boot.web.server.Compression; @@ -246,7 +247,7 @@ public abstract class AbstractReactiveWebServerFactoryTests { } protected ReactorClientHttpConnector buildTrustAllSslConnector() { - Http11SslContextSpec sslContextSpec = Http11SslContextSpec.forClient() + GenericSslContextSpec sslContextSpec = Http11SslContextSpec.forClient() .configure((builder) -> builder.sslProvider(SslProvider.JDK) .trustManager(InsecureTrustManagerFactory.INSTANCE)); HttpClient client = HttpClient.create().wiretap(true).secure((spec) -> spec.sslContext(sslContextSpec)); @@ -285,7 +286,7 @@ public abstract class AbstractReactiveWebServerFactoryTests { .getInstance(KeyManagerFactory.getDefaultAlgorithm()); clientKeyManagerFactory.init(clientKeyStore, keyStorePassword.toCharArray()); - Http11SslContextSpec sslContextSpec = Http11SslContextSpec.forClient() + GenericSslContextSpec sslContextSpec = Http11SslContextSpec.forClient() .configure((builder) -> builder.sslProvider(SslProvider.JDK) .trustManager(InsecureTrustManagerFactory.INSTANCE) .keyManager(clientKeyManagerFactory));