Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts
์ ๊ท ํ๋ก์ ํธ์์ ์คํ๋ง ๋ถํธ 3 ๊ธฐ๋ฐ์ผ๋ก ํ๋ก์ ํธ๋ฅผ ์์ฑํ๊ณ ๊ฐ๋ฐํ๋ ์์ ๊ฐ์ ๋ก๊ทธ๊ฐ ์ถ๋ ฅ๋๋ ๊ฒ์ ์ธ์งํ์๋ค. ์คํ๋ง ๋ถํธ๋ ๋ด๋ถ์ ์ผ๋ก commons-logging ์ ์ฌ์ฉํ๊ณ ์์ผ๋ spring-jcl ๋ชจ๋์ ํตํด Slf4j ๋ก ๋์ํ ์ ์๋๋ก ๋์ด์๊ณ ๊ธฐ๋ณธ์ ์ผ๋ก Logback ์ ์ฌ์ฉํ๊ณ ์๋ ๊ฑธ๋ก ์๊ณ ์์๊ธฐ์ ์์ํ๋ค. ์ ๋ก๊ทธ๋ ์คํ๋ง ํ๋ ์์ํฌ 6.0 ๋ถํฐ ํด๋์ค ํจ์ค์ commons-logging ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ํฌํจ๋์ด ์์๊ฒฝ์ฐ ์ถ๋ ฅ๋๋๋ฐ LogFactoryService.java ์์ System.out.println์ ์ฌ์ฉํ๊ณ ์๋ค.
commons-logging ๊ฐ ํฌํจ๋๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ โ
commons-logging ๋ชจ๋์ด ํฌํจ๋๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ์๊ฐ๋ณด๋ค ๋ง์๋ฐ ๋๋ต์ ์ผ๋ก ์๋์ ๊ฐ๋ค. AWS ํด๋ผ์ฐ๋ ์๋น์ค์ ์์กดํ๋ ๊ฒฝ์ฐ ๋ง์ด ์ฌ์ฉํ๋ AWS Java SDK ์๋ commons-logging ์ ํฌํจํ๊ณ ์์ด ์ฝ๊ฒ ์ถ๋ ฅ๋ ์ ์์ ๊ฒ ๊ฐ๋ค.
dependencies {
implementation 'commons-beanutils:commons-beanutils:1.9.4'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'org.apache.commons:commons-dbcp2:2.11.0'
implementation platform('com.amazonaws:aws-java-sdk-bom:1.12.529')
implementation 'com.amazonaws:aws-java-sdk-ec2'
}
ํด๊ฒฐ๋ฐฉ์ โ
ํด๋น ๋ก๊ทธ๋ ํด๋์คํจ์ค์ commons-logging ์ด ํฌํจ๋ ๋ ์ถ๋ ฅ๋๋ฏ๋ก commons-logging ๋ชจ๋์ด ํฌํจ๋์ง ์๋๋ก ์ ์ธํ๋ฉด ๋๋ค.
configurations.all {
exclude group: 'commons-logging', module: 'commons-logging'
}