The Problem:
While using the dependency org.springdoc
in a Spring Boot project, an error is encountered: UnsatisfiedDependencyException: Error creating bean with name 'swaggerWelcome' defined in class path resource [org/springdoc/webmvc/ui/SwaggerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springdoc.webmvc.ui.SwaggerWelcomeWebMvc]: Factory method 'swaggerWelcome' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/http/HttpStatusCode
.
The Solutions:
Solution 1: Dependency Version Incompatibility
The error is caused by the version of Springdoc which requires a higher version of Spring Boot.
ToUpdate the dependencies, the user needs to:
- Update the Spring Boot version to 3.0.0 or higher.
- Update the org.springdoc dependency version
Video Explanation:
The following video, titled "How to fix error: Module not specified in IntelliJ IDEA in Edit ...", provides additional insights and in-depth exploration related to the topics discussed in this post.
This video provides further insights and detailed explanations related to the content discussed in the article.
The following video, titled "How to fix error: Module not specified in IntelliJ IDEA in Edit ...", provides additional insights and in-depth exploration related to the topics discussed in this post.
This video provides further insights and detailed explanations related to the content discussed in the article.