Description
Describe the bug
This seems related to issues #1607 and #1617, maybe a remaining corner case?
If the following configuration is used, the application fails to start:
management.endpoints.web.exposure.include: "*"
The error message is the same as in #1607 and #1617:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of method webConversionServiceProvider in org.springdoc.core.configuration.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
The following versions are used:
- Spring Boot v3.0.0-RC1
- Spring Cloud v2022.0.0-M5
- springdoc-openapi-starter-webflux-ui v2.0.0-M7
Sample
product-composite-service.zip
To Reproduce
Steps to reproduce the behavior:
-
Unzip the attached sample code.
-
Build and start the server with:
./gradlew clean test bootRun
-
Run the following curl commands to verify it works as expcted:
curl localhost:7000/api -so /dev/null -w "%{http_code}\n" curl localhost:7000/openapi/swagger-ui.html -Lso /dev/null -w "%{http_code}\n" curl localhost:7000/openapi/webjars/swagger-ui/index.html -so /dev/null -w "%{http_code}\n" curl localhost:7000/openapi/v3/api-docs -so /dev/null -w "%{http_code}\n" curl localhost:7000/openapi/v3/api-docs.yaml -so /dev/null -w "%{http_code}\n"
Expect them all to return
200
. -
Stop the application
-
Edit
src/main/resources/application.yml
and remove the comment mark before:management.endpoints.web.exposure.include: "*"
-
Start the application again and it will now fail with the error message shown above.
Expected behavior
That the application starts up normally and the curl commands mentioned above all return 200
, when using the setting management.endpoints.web.exposure.include: "*"
.