Skip to content

swaggerWelcome `WebFluxProperties' that could not be found #1047

Closed
@Jo-GyuHyeon

Description

@Jo-GyuHyeon

Inheritance of 'WebFluxConfigurationSupport' will result in an error as shown in the picture below.

스크린샷 2021-01-30 오전 12 47 47

Parameter 3 of method swaggerWelcome in org.springdoc.webflux.ui.SwaggerConfig required a bean of type 'org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.boot.autoconfigure.web.reactive.WebFluxProperties' in your configuration.

This is my sample code.

@Configuration
@ConditionalOnClass(WebFluxConfigurer::class)
open class WebFluxConfiguration(
): WebFluxConfigurationSupport() {
}

@SpringBootApplication
class DemoApplication

fun main(args: Array<String>) {
  runApplication<DemoApplication>(*args)
}


This is my project build.gradle.kts .

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
  id("org.springframework.boot") version "2.4.2"
  id("io.spring.dependency-management") version "1.0.11.RELEASE"
  kotlin("jvm") version "1.4.21"
  kotlin("plugin.spring") version "1.4.21"
}

group = "com.example"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_15

repositories {
  mavenCentral()
}

dependencies {
  implementation("org.springframework.boot:spring-boot-starter-webflux")
  implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
  implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
  implementation("org.jetbrains.kotlin:kotlin-reflect")
  implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
  testImplementation("org.springframework.boot:spring-boot-starter-test")
  testImplementation("io.projectreactor:reactor-test")

  implementation("org.springframework.boot:spring-boot-starter-actuator")
  implementation("org.springdoc:springdoc-openapi-kotlin:1.5.3")
  implementation("org.springdoc:springdoc-openapi-webflux-ui:1.5.3")
}

tasks.withType<KotlinCompile> {
  kotlinOptions {
    freeCompilerArgs = listOf("-Xjsr305=strict")
    jvmTarget = "15"
  }
}

tasks.withType<Test> {
  useJUnitPlatform()
}

There was no problem with the previous version.
I desperately want help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions