Failed to start bean 'documentationPluginsBootstrapper'

使用Springboot2.7.0构建项目

    implementation 'mysql:mysql-connector-java'
    implementation 'com.alibaba:druid-spring-boot-starter:1.2.11'
    implementation 'com.baomidou:mybatis-plus-boot-starter:3.5.2'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'io.springfox:springfox-boot-starter:3.0.0'

之后发生异常


异常截图.png

发现是路径配置器报了一个NullPointerException,
经分析发现Springboot2.7.0使用的是,是实现类为,而在Springboot2.6.X之前使用的都是, 实现类为。

RouteMatcher.png

而springfox使用的依旧是 , 导致在启动时,无法获取 实例,而报出异常。
解决办法:在配置文件中指定配置器。

spring:
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher

你可能感兴趣的:(Failed to start bean 'documentationPluginsBootstrapper')