스프링부트 환경에서 Swagger를 사용하게 되었는데, 아래와 같은 에러가 발생했다.

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

처음에는 bean 문제인가 뭔가 싶었는데 , 구글링해보니

Spring boot 버전 2.6이후부터

spring.mvc.pathmatch.matching-strategy 값이

ant_path_matcher 에서 path_pattern_parser 로 변경되어 오류가 계속 식별되고 있다고 한다.

고치는 방법이 따로 있다고 한다.

1.프로젝트 -> src-> main-> resources-> application.properties 로 접근

2.아래 내용 추가

3. 결과

성공 !

* 자바랑 스프링 쓸 때마다 느끼는 건데 잡에러가 많은 거 같다.. 방심하지말고 조심하자

+ Recent posts