引言:喜欢自学的新手们,在学习Swagger生成API文档的时候经常会遇到问题,而目前市面上大部分技术分享者的SpringBoot版本并没和我们的同步,导致一些一模一样的代码,在我们的项目上却无法使用,这是一个经常性的问题,本文章就旨在和大家列举几种常用的项目搭配,来解决访问网址:http://localhost:8080/swagger-ui/index.html 报错“Error Page”的问题。 首先声明一下使用 Spring Boot 2.7 及以上版本时,Swagger 2.9.2会有一些兼容性问题,很有可能在项目运行前我们就饮恨于此了。 比较常见的几个错误: 1、“org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException” 2、“Failed to start bean...