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) }