Skip to content

Parameter 3 of method swaggerWelcome in org.springdoc.webmvc.ui.SwaggerConfig required a single bean, but 3 were found #1292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
berndgoetz opened this issue Oct 10, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@berndgoetz
Copy link

I am trying to switch from Springfox to Spring Doc. I've followed https://springdoc.org/#migrating-from-springfox, but my service now fails at startup with

Parameter 3 of method swaggerWelcome in org.springdoc.webmvc.ui.SwaggerConfig required a single bean, but 3 were found:
	- requestMappingHandlerMapping: defined by method 'requestMappingHandlerMapping' in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]
	- webEndpointServletHandlerMapping: defined by method 'webEndpointServletHandlerMapping' in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/servlet/WebMvcEndpointManagementContextConfiguration.class]
	- controllerEndpointHandlerMapping: defined by method 'controllerEndpointHandlerMapping' in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/servlet/WebMvcEndpointManagementContextConfiguration.class]

I'm using Spring Boot 2.5.5, Spring Doc OpenAPI 1.5.11. I've created two GroupedOpenApi and one OpenAPI beans. Otherwise nothing fancy so far. Using Gradle 7.2 for the build. Java 11.

If it's a known issue, happy to hear the resolution. If not, I'll create a simple project and put it to my github account. I can't share the project itself as is.

@bnasslahsen
Copy link
Collaborator

@berndgoetz,

Duplicate of #1288

Stick with v1.5.10, if you are having this issue.
This one will be solved for the next release.

@bnasslahsen bnasslahsen added the duplicate This issue or pull request already exists label Oct 10, 2021
@berndgoetz
Copy link
Author

@bnasslahsen thanks for the quick response. I went back to 1.5.10 and everything works like a charm. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants