swagger引入问题报错‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPointerException

  • Post author:
  • Post category:java


为了给spring boot项目引入swagger 出现了各种错误刚开始还以为是版本的问题 一直在降低版本 后来才发现是这个问题

因为Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher。

解决办法,修改application.yaml

spring:
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher



版权声明:本文为bazheling原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。