๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

SpringBoot2

[Log4j2 ์ทจ์•ฝ์  ์ด์Šˆ] spring boot ๋‚ด์žฅ๋œ Log4j2 ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฒ„์ „ ๋ณ€๊ฒฝํ•˜๊ธฐ (maven, gradle) ์ง€๋‚œ์ฃผ ์ฃผ๋ง์— log4j2 ์ทจ์•ฝ์  ์ด์Šˆ๊ฐ€ ์žˆ์—ˆ๋‹ค. ๋‹คํ–‰ํžˆ ์šฐ๋ฆฌ ํ”„๋กœ์ ํŠธ์—์„  ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” log4j2-core๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์ง€ ์•Š์•˜์ง€๋งŒ log4j2-api, log4j-to-slf4์™€ ๊ฐ™์€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋„ ์ตœ์‹ ํ™”ํ•˜๊ณ ์ž ํ–ˆ๋‹ค. Spring Boot ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋‚ด์žฅ๋œ log4j2๋ฅผ ์‚ฌ์šฉ ์ค‘์ด์˜€๊ณ , ๋จผ์ € Spring Boot์˜ ๋ฒ„์ „์„ ๊ฐ€์žฅ ์ตœ์‹  ๋ฒ„์ „์ธ 2.6.1๋กœ ๋ณ€๊ฒฝํ•˜์˜€๋‹ค. ํ•˜์ง€๋งŒ 2.6.1 ๋ฒ„์ „์— ๋‚ด์žฅ๋œ log4j2์˜ ๋ฒ„์ „์€ 2.14.1์ด์˜€๊ณ .. ๋‚ด์žฅ๋œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์˜ ๋ฒ„์ „์„ ๋ณ€๊ฒฝํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ฐพ์•„ ํ•ด๊ฒฐํ•˜์˜€๋‹ค! ๋ฐฉ๋ฒ•1 2.17.0์ธ log4j-api, log4j-to-slf4j๋ฅผ ์„ ์–ธํ•ด์ฃผ๋ฉด spring boot์— ๋‚ด์žฅ๋œ log4j์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ฒ„์ „์ด ๋ณ€๊ฒฝ๋œ๋‹ค. gradle implementation group: '.. 2021. 12. 17.
[Spring Boot] mybatis ์ ์šฉํ•˜๊ธฐ 1.gradle ํ˜น์€ maven์— 'mybatis-spring-boot-starter' ์ถ”๊ฐ€ compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4") org.mybatis.spring.boot mybatis-spring-boot-starter 2.1.4 2. application.yml์— mybatis ์„ค์ • ํŒŒ์ผ(mybatis-config.xml) ๋ฐ xml ํŒŒ์ผ ์„ธํŒ… mybatis: config-location: classpath:mybatis-config.xml mapper-locations: classpath:mapper/postgresql/*.xml 3. mybatis-config.xml 4. postgresql/*.xml SELE.. 2021. 12. 6.
728x90
๋ฐ˜์‘ํ˜•