Error Log
Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts Exception in thread "main" java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.simple.SimpleLoggerFactory loaded from file:/Users/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/2.0.16/56d3d8e59293543780ad35af4ee4a5d9c111a588/slf4j-simple-2.0.16.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.simple.SimpleLoggerFactory at org.springframework.util.Assert.instanceCheckFailed(Assert.java:618) at org.springframework.util.Assert.isInstanceOf(Assert.java:533) at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:412)
LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation
Gradle에서 의존성을 확인할 때, 여러 라이브러리들이 각자의 로깅 구현체를 포함할 수 있다.
내가 설정한 어떤 의존성에 의해 Slf4j 바인딩 충돌이 발생한 것으로 추정,
build.gradle의 configurations 설정에 아래와 같이 configureEach를 추가하고 해결됐지만 아직 원인을 정확히는 모르겠다.
configurations { compileOnly { extendsFrom annotationProcessor } configureEach { exclude group: 'org.slf4j', module: 'slf4j-log4j12' exclude group: 'log4j', module: 'log4j' exclude group: 'org.slf4j', module: 'slf4j-jdk14' exclude group: 'org.slf4j', module: 'slf4j-simple' } }