SpringBoot集成 Swagger 后,启动报 org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException

 

错误图示:

 

原因:是因为 Swagger 和 SpringBoot 的版本兼容

 解决办法:修改 SpringBoot  版本即可:

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

  

 

posted @ 2022-02-06 21:41  快走中的擦边球  阅读(1067)  评论(0编辑  收藏  举报