Backend/Spring
[오류해결-swagger] Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
고윤복
2022. 5. 18. 11:37
Spring boot에서 swagger를 사용하기 위해 아래와 같이 추가하고 서버를 실행하니 하니 아래와 같은 오류가 발생했다.
// https://mvnrepository.com/artifact/io.springfox/springfox-boot-starter
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
Why~~~!
왜 또ㅠㅠ!!
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
다시 서버 재실행. 성공