Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier

콜트·2023년 7월 27일
0

Planning for the advent of Jigsaw (Java 9), slf4j-api version 2.0.x and later use the ServiceLoader mechanism. Earlier versions of SLF4J relied on the static binder mechanism which is no longer honored by slf4j-api version 2.0.x.

In case SLF4J finds no providers targeting SLF4J 2.0.x but finds instead bindings targeting SLF4J 1.7 or earlier, it will list the bindings it finds but otherwise will ignore them.

This can be solved by placing an SLF4J provider on your classpath, such providers include logback version 1.3.x and later, as well as one of slf4j-reload4j, slf4j-jdk14, slf4j-simple version 2.0.0 or later.

See also the FAQ entry What has changed in SLF4J version 2.0.0? for further important details.

요약

간단히 말하자면, SLF4J 관련 라이브러리 버전이 낮은 것이 classpath에 잡히고 있으니, 이를 변경하라는 뜻이다.

implementation("ch.qos.logback:logback-classic:1.4.8")

build.gradle.ktsdependencies 블록에 위 의존성을 추가하여 해결.

profile
개발 블로그이지만 꼭 개발 이야기만 쓰라는 법은 없으니, 그냥 쓰고 싶은 내용이면 뭐든 쓰려고 합니다. 코드는 깃허브에다 작성할 수도 있으니까요.

0개의 댓글