question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

springdoc-openapi-webflux-ui v1.6.7 + spring actuator + spring cloud crashes at startup

See original GitHub issue

Describe the bug If your java/kotlin application uses a combination of springdoc-openapi-webflux-ui v1.6.7 + spring actuator + spring cloud stream - it crashes on startup with the message:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method webConversionServiceProvider in org.springdoc.core.SpringDocConfiguration$WebConversionServiceConfiguration required a single bean, but 2 were found:
	- webFluxConversionService: defined by method 'webFluxConversionService' in class path resource [org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration$EnableWebFluxConfiguration.class]
	- integrationConversionService: defined in null

To Reproduce Steps to reproduce the behavior:

  1. Create a new spring boot application at the spring initializr. Add the following dependencies:
    • “Spring Boot Actuator”
    • “Cloud Stream”
    • “Spring Reactive Web”
  2. Programming language doesn’t matter (I reproduced the bug with Java and Kotlin).
  3. Download and unpack the archive.
  4. Add the swagger into build.gradle:
implementation("org.springdoc:springdoc-openapi-webflux-ui:1.6.7")
  1. Run the app

My build.gradle:

plugins {
    id 'org.springframework.boot' version '2.6.6'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'java'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

repositories {
    mavenCentral()
}

ext {
    set('springCloudVersion', "2021.0.1")
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    implementation 'org.springframework.boot:spring-boot-starter-webflux'
    implementation 'org.springframework.cloud:spring-cloud-stream'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'io.projectreactor:reactor-test'

    implementation("org.springdoc:springdoc-openapi-webflux-ui:1.6.7")
}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}

Expected behavior Web app shouldn’t crash

Screenshots none

Additional context Versions:

  • Spring-boot 2.6.6
  • springdoc-openapi-webflux-ui v1.6.7

Any of the following actions fix the problem:

  1. change the springdoc-openapi-webflux-ui to v1.6.6
  2. remove the spring-boot-starter-actuator dependency
  3. remove the spring-cloud-stream dependency

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mshimacommented, Apr 20, 2022

Thanks @bnasslahsen

0reactions
bnasslahsencommented, Apr 29, 2022

@jongidal,

Use v1.6.8

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does my basic spring boot app crash right after build?
However if i try to run mvn spring-boot:run the app will build just fine, but will crash shortly after that. Any help will...
Read more >
Production-ready Features - Spring
Actuator endpoints let you monitor and interact with your application. Spring Boot includes a number of built-in endpoints and lets you add your...
Read more >
Spring Boot Actuator | Baeldung
A quick intro to Spring Boot Actuators - using and extending the existing ones, configuration and rolling your own.
Read more >
Exploiting Spring Boot Actuators | Veracode blog
For Spring Boot 1 - 1.4, they are accessible without authentication, causing significant problems with security. Starting with Spring version ...
Read more >
Getting Started - resilience4j
Setup and usage in Spring Boot 2 is demonstrated into a demo. Configuration. You can configure your CircuitBreaker, Retry, RateLimiter , Bulkhead and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found