스프링부트 환경에서 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. 결과

성공 !
* 자바랑 스프링 쓸 때마다 느끼는 건데 잡에러가 많은 거 같다.. 방심하지말고 조심하자
'Spring' 카테고리의 다른 글
[Spring] Java를 설치해보자(Feat.M1 맥북, Zulu) (1) | 2025.02.14 |
---|---|
[Spring] 스프링 시큐리티 403에러 조치(feat.Swagger) (0) | 2025.02.13 |
[Spring] JWT 토큰 에러 (0) | 2025.02.13 |
[Spring] please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect' (0) | 2025.02.13 |
[Spring] No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor (0) | 2025.02.13 |