springboot 실행시 아래와 같은 에러 발생
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.impl.Log4jLoggerFactory loaded from jar:file:/Users/user/workspace/aim/server/build/libs/aim-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/slf4j-log4j12-1.7.30.jar!/). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.impl.Log4jLoggerFactory
찾아보면 logback에서 이미 라이브러리를 선언하고 있으니 slf4j 라이브러리를 제외하면 된다.
gradle 기준으로 아래와 같이 작성한후 build
configurations {
compile.exclude group: "org.slf4j", module: "slf4j-log4j12"
}
'Programming > Java' 카테고리의 다른 글
[jRebel] springboot 2.4.0 error (0) | 2020.11.23 |
---|---|
[intellij] Cannot resolve symbol 'String' (1) | 2020.09.05 |
gradle build skip test (0) | 2020.05.04 |
[Error] Could not resolve org.nodejs:node:12.16.1. (0) | 2020.05.04 |
No qualifying bean of type 'org.modelmapper.ModelMapper' available: 해결방법 (0) | 2019.12.11 |