Add dependency
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
Write swagger2 configuration class
@Enablewebmvc annotation can solve
Failed to start bean ‘documentationpluginsbootstrapper’
@Configuration
@EnableWebMvc
public class Swagger2Config {
}
test
Start the project and enter the web address
Swagger2.2.x. The website of version x is
http://localhost:8080/swagger-ui.html
For versions of swagger2 after 3.0.0, the website is
http://localhost:8080/swagger-ui/index.html
Similar Posts:
- [Solved] Whitelabel page error when using Swagger2 in SpringBoot
- [Solved] Springboot integrate swagger Error: failed to start bean ‘documentationpluginsboot
- [Solved] Swagger Error: Failed to start bean ‘documentationPluginsBootstrapper’
- [Solved] Spring boot 2.6.2 Use Swagger3 Error: Failed to start bean ‘documentationPluginsBootstrapper’;
- [Solved] Springboot integrate swagger Error: Failed to start bean ‘documentationPluginsBootstrapper‘
- [Solved] SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
- .net5 swagger Failed to load API definition. Fetch errorundefined /swagger/v1/swagger.json
- [Solved] The swagger UI dependency is introduced into spring boot Error
- Compilation failure cannot find the class file for org.apache.http.annotation.notthreadsafe
- An error is reported when swagger is used: failed to load API definition