본문 바로가기

JAVA/Error

[Swagger] Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException"

 

 

SwaggerConfig에 내용 추가 후 서버를 구동하니 해당 에러가 발생했다.

 

 Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException"

 

 

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

ant_apth_matcher 에서  path_pattern_parser로 변경되면서 몇몇 라이브러리에 오류가 발생한다고 한다.

 

 

application.properties 에 추가해주면 된다.

 

spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER

 

 

yml(yaml) 일 경우 

 

spring:
  mvc:
    pathmatch:
      matching-strategy: ANT_PATH_MATCHER