org.springframework.context.ApplicationContextException的解决办法

152 阅读1分钟

org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper的解决办法:

原因:

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

解决方法:

在application.yml里添加如下代码:

spring:
  mvc:
    pathmatch:
      matching-strategy:
        ANT_PATH_MATCHER