Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
Springboot 集成Swagger报错
原因:Spring Boot 2.6.0+version:默认禁止Bean的循环引用
解决方案:(二选一即可)
1、降级:将Springboot 版本将至2.4即可。
2、修改配置文件:spring.mvc.pathmatch.matching-strategy=ant-path-matcher
修改后可正常访问:
参考资料:
https://www.bilibili.com/read/cv14105078/
https://stackoverflow.com/questions/63991872/failed-to-start-bean-documentationpluginsbootstrapper-spring-boot-swagger-impl