springdoc-openapi-webflux-ui v1.6.7 + spring actuator + spring cloud crashes at startup
See original GitHub issueDescribe 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:
- Create a new spring boot application at the spring initializr. Add the following dependencies:
- “Spring Boot Actuator”
- “Cloud Stream”
- “Spring Reactive Web”
- Programming language doesn’t matter (I reproduced the bug with Java and Kotlin).
- Download and unpack the archive.
- Add the swagger into
build.gradle:
implementation("org.springdoc:springdoc-openapi-webflux-ui:1.6.7")
- 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:
- change the
springdoc-openapi-webflux-uito v1.6.6 - remove the
spring-boot-starter-actuatordependency - remove the
spring-cloud-streamdependency
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks @bnasslahsen
@jongidal,
Use
v1.6.8