Seize your moment! ๐Ÿ‘พ

์•ˆ๋…•ํ•˜์„ธ์š”. Eric์ž…๋‹ˆ๋‹ค. ์ œ ๋ธ”๋กœ๊ทธ์— ๋ฐฉ๋ฌธํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ’ป ๊ฐœ๋ฐœ๊ณต๋ถ€/IDE

[Eric's IDE] intelliJ - log4j ์ธ์‹๋ถˆ๊ฐ€ ํ˜„์ƒ (org.apache.commons.logging does not exist)

Eric_ko 2022. 10. 12. 01:32
- ๊ฐœ๋ฐœํ™˜๊ฒฝ
M1 MacBook Pro
Language : Java
IDE : intelliJ
Build Tool : Gradle

๐Ÿ”ฅ ๋ฌธ์ œ์ƒํ™ฉ

 

-Project Settings ์—์„œ log4j ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ์œ„ํ•ด์„œ, commons-logging-1.2 , log4j-1.2.17 ํŒŒ์ผ์„ Project Library ์— ์ถ”๊ฐ€ํ•˜์˜€์œผ๋‚˜,

Java ํŒŒ์ผ์„ run ํ•ด์„œ ์‚ฌ์šฉํ•˜๋ ค๊ณ ํ• ๋•Œ, ํ•˜๋‹จ๊ณผ ๊ฐ™์ด Java file ๋‚ด๋ถ€์˜ import๋œ org.apache.commons.logging ์„ ์ธ์‹ํ•˜์ง€ ๋ชปํ•ด์„œ compile ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒ (org.apache.commons.logging does not exist)

 ๋‚˜๋Š” ๋ถ„๋ช…ํžˆ ํ•˜๋‹จ๊ณผ ๊ฐ™์ด Setting ํ•˜์˜€๋‹ค.

 

 โœ… ํ•ด๊ฒฐ๋ฐฉ๋ฒ•

 

 ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ๊ฐ„๋‹จํ•˜๋‹ค.

 build.gradle ํŒŒ์ผ์—์„œ ํ•˜๋‹จ์˜ ๋‚ด์šฉ์„ implementation ํ•˜๋ฉด ๋œ๋‹ค.

implementation 'commons-logging:commons-logging:1.2'
implementation group: 'log4j', name: 'log4j', version: '1.2.17'

 โœ… ๊ฒฐ๊ณผ

ํ•˜๋‹จ๊ณผ ๊ฐ™์ด ์ •์ƒ์ ์œผ๋กœ java file ์ด run ๋œ๊ฒƒ์„ ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

gradle ์„ ์ฒ˜์Œ ์‚ฌ์šฉํ•ด๋ณด์•„์„œ

์ต์ˆ™ํ•˜์ง€ ์•Š์•„์„œ ๋ฐœ์ƒํ•œ ๋ฌธ์ œ!