From 1fdd42e9b6d643d135af0572ba32aa6898e557fc Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Thu, 7 Aug 2025 08:09:18 +0200 Subject: [PATCH] Fix Kotlin sample of reactive cloudfoundry configuration See gh-46587 --- .../customcontextpath/MyReactiveCloudFoundryConfiguration.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt b/documentation/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt index 4b4871019cd..8d922f000a5 100644 --- a/documentation/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt +++ b/documentation/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/actuator/cloudfoundry/customcontextpath/MyReactiveCloudFoundryConfiguration.kt @@ -34,7 +34,7 @@ class MyReactiveCloudFoundryConfiguration { @Bean fun httpHandler(applicationContext: ApplicationContext, properties: WebFluxProperties): HttpHandler { val httpHandler = WebHttpHandlerBuilder.applicationContext(applicationContext).build() - return CloudFoundryHttpHandler(properties.basePath, httpHandler) + return CloudFoundryHttpHandler(properties.basePath ?: "/", httpHandler) } private class CloudFoundryHttpHandler(basePath: String, private val delegate: HttpHandler) : HttpHandler {