개발자의 삶/기타
[swagger] Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException"
Kedric
2022. 6. 7. 13:09
반응형
Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException"
서버 API 제공을 위해서 swagger 설정을 하다가
해당 에러가 발생했다.
구글링해보니
Spring boot 2.6버전 이후에 spring.mvc.pathmatch.matching-strategy 값이 ant_apth_matcher에서 path_pattern_parser로 변경되면서 몇몇 라이브러리(swagger포함)에 오류가 발생한다고 한다.
따라서
application.properties 에 아래처럼 추가해주면 된다고 한다.
spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER
나의 경우 yaml이라서 아래처럼 추가해주었다.
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
반응형