๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ/Web

ํ•˜๋‚˜์˜ tomcat์— ๊ฐ™์€ ํ”„๋กœ์ ํŠธ ๋‘๊ฐœ ์ด์ƒ ๋„์šฐ๊ธฐ : 'webapp.root' ์—๋Ÿฌ

by ynzu๐Ÿค 2021. 12. 13.
๋ฐ˜์‘ํ˜•

ํ•˜๋‚˜์˜ ํ†ฐ์บฃ์— ๊ฐ™์€ ํ”„๋กœ์ ํŠธ๋ฅผ ๋‘๊ฐœ ์ด์ƒ ๋„์—ˆ์„ ๋•Œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.

์‹ฌ๊ฐ: Exception sending context initialized event to listener instance of class ch.qos.logback.ext.spring.web.LogbackConfigListener
java.lang.IllegalStateException: Web app root system property already set to different value: 'webapp.root'

 

log4j์˜ default value๊ฐ€ webapp.root๋ผ ๋”ฐ๋กœ ์ง€์ •ํ•ด์ฃผ์ง€ ์•Š๋Š”๋‹ค๋ฉด ์ค‘๋ณต๋œ๋‹ค. 

ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์€ ๊ฐ„๋‹จํ•œ๋‹ค!  web.xml์— ์•„๋ž˜์™€ ๊ฐ™์ด ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ๋! param-value๋ฅผ ์ง€์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค

<context-param>
   <param-name>webAppRootKey</param-name>
   <param-value>test.root</param-value>
 </context-param>
728x90
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€