spring boot
upgrade to 2.6.x+ version, I suddenly found the following error when integrating with swagger
:
org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
Reason: because the path matching used by springfox
is based on AntPathMatcher, and spring boot 2.6.X
uses PathPatternMatcher, which can change the matching rules
Solution:
add the following configuration in the configuration file (application.yaml
)
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
Read More:
- Springboot Integrate Swagger2 Error: Failed to start bean ‘documentationPluginsBootstrapper‘;
- [Solved] Springboot integrate swagger error: failed to start bean ‘documentationpluginsbootstrapper‘
- [Solved] swagger Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullP
- [Solved] ApplicationContextException: Failed to start bean ‘documentationPluginsBootstrapper‘;
- [Solved] Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
- [Solved] Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPointerEx
- Failed to start bean ‘documentationPluginsBootstrapper‘ [How to Solve]
- springboot Integrate mybatis Error: Error creating bean with name ‘deptController‘: Unsatisfied dependency expresse
- Springboot2.6X version integrate knife4j error [How to Solve]
- Springboot2.6.X configurate swagger error [How to Solve]
- Springboot error about swagger startup [How to Solve]
- [Solved] SpringBoot Integrate ES Error: Elasticsearch health check failed
- [Solved] Failed to start bean ‘eurekaAutoServiceRegistration‘; nested exception is java.lang.NullPointerExce
- SpringBoot+Swagger Error: 403 Forbidden [How to Solve]
- [Solved] Springboot Error: swagger-UI/index.html Access Error 404
- Springboot mybatis Integrate Error: Invalid bound statement (not found): com…DepartmentMapper.save
- [Solved] Rabbitmq injection failed, bean creation failed, error creating bean with name ‘rabbitconnectionfactory’‘
- SpringBoot Startup Error: Failed to start component [Connector[HTTP/1.1-8080]]
- How to Solve Swagger error: IllegalStateException
- [Solved] org.springframework.context.ApplicationContextException: Failed to start bean ‘org.springframework.a