SpringBoot解决Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException:

原因

我的原因是在导入Swggaer时,因为swagger要求的springBoot版本与当前springboot版本不符合,当前springboot的版本是2.6.2,版本太高,缺失相应的依赖。

解决方法

将springboot 的版本回退到2.5.3。

  <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>