본문 바로가기

JAVA/Error

[Swagger] Error - org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper';

 

 

org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper';

 

Spring boot 2.6 이후에 spring.mvc.pathmatch.matching-strategy 값이

ant_apth_matcher에서 path_pattern_parser로 변경되면서 몇몇 라이브러리(swagger포함)에 오류가 발생.

 

 

application.yml - 설정 추가

 

spring:
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher

 

 

+

Spring boot 와 Swagger 의 버전 호환 문제도 있다고 한다.

Swagger 2.9.2 버전은 Spring boot 2.4.0 버전 이하만 된다.

기존에 2.4.0 을 사용하고 있었어서 문제가 없었다.