From 823b5b580f4fabba1c18cb04b9ec345501656064 Mon Sep 17 00:00:00 2001 From: SujitMBRDI Date: Mon, 28 Oct 2024 18:00:09 +0530 Subject: [PATCH] feat(bpdm-common): SwaggerUiConfigProperties optional in Landing Page --- .../eclipse/tractusx/bpdm/common/config/LandingPageConfig.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/config/LandingPageConfig.kt b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/config/LandingPageConfig.kt index 391455bba..e8bf072d7 100644 --- a/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/config/LandingPageConfig.kt +++ b/bpdm-common/src/main/kotlin/org/eclipse/tractusx/bpdm/common/config/LandingPageConfig.kt @@ -28,13 +28,14 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer @Configuration class LandingPageConfig( - val swaggerProperties: SwaggerUiConfigProperties + val swaggerProperties: SwaggerUiConfigProperties? ) : WebMvcConfigurer{ private val logger = KotlinLogging.logger { } override fun addViewControllers(registry: ViewControllerRegistry) { - val redirectUri = swaggerProperties.path + if(swaggerProperties == null) return + val redirectUri = swaggerProperties!!.path logger.info { "Set landing page to path '$redirectUri'" } registry.addRedirectViewController("/", redirectUri) }