org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException 오류

선형채·2024년 2월 8일

SpringBoot에서 swagger 연결시 org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException 오류가 발생하였다

원인

대개 해당 빈이나 빈에 의존하는 다른 빈 중 하나가 null인 상태에서 해당 빈을 초기화하려고 시도했기 때문에 발생합니다. 보통 이러한 문제는 의존성 주입이나 빈의 초기화 과정에서 누락된 구성 요소가 있거나, null 값이 예상대로 제공되지 않을 때 발생합니다.

해결방법

application.yml 파일에

spring:
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher

추가해주면 된다 !

profile
JAVA BACK-END DEVELOPER 👩‍💻

0개의 댓글