๋กœ์ผ“๐Ÿพ
article thumbnail
[Spring] ApplicationContext์™€ WebApplicationContext
... 2021. 1. 20. 23:26

์ด ๊ธ€์€ ์ œ๊ฐ€ ์ดํ•ดํ•œ ๊ฐœ๋…์„ ๋ฐ”ํƒ•์œผ๋กœ ์ž‘์„ฑํ•˜์˜€๊ธฐ์— ํ‹€๋ฆฐ ๋ถ€๋ถ„์ด ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ‹€๋ฆฐ ๋ถ€๋ถ„ ์žˆ๋‹ค๋ฉด ์ง€์ ํ•ด์ฃผ์„ธ์š” :) ์Šคํ”„๋ง์—์„œ ๋งํ•˜๋Š” ์ปจํ…์ŠคํŠธ(context)๋Š” ์Šคํ”„๋ง์ด ๊ด€๋ฆฌํ•˜๋Š” ๋นˆ๋“ค์ด ๋‹ด๊ฒจ ์žˆ๋Š” ์ปจํ…Œ์ด๋„ˆ ๋ผ๊ณ  ์ƒ๊ฐํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์Šคํ”„๋ง์„ ๊ณ„์† ๊ณต๋ถ€์ค‘์ด์ง€๋งŒ ์—„์ฒญ ํ—ท๊ฐˆ๋ ธ๋˜ ๋ถ€๋ถ„์ด WebApplicationContext์™€ ApplicationContext์˜ ๊ด€๊ณ„, web.xml์—์„œ์˜ servlet-context์™€ root-context์˜ ๊ด€๊ณ„ ๊ทธ๋ฆฌ๊ณ  ContextLoaderListenter์™€ dispatcher-servlet์˜ ๊ด€๊ณ„ ์ด ์ด 3๊ฐœ์˜ ๊ด€๊ณ„๊ฐ€ ๋ณผ๋•Œ๋งˆ๋‹ค ํ—ท๊ฐˆ๋ ธ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด ๊ด€๊ณ„๋“ค์„ ์•„๋ž˜์™€ ๊ฐ™์ด ๊ทธ๋ฆผํ™”ํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค. # web.xml์—์„œ์˜ Context contextConfigLocation c..

article thumbnail
[Spring] root-context์™€ servlet-context
... 2021. 1. 20. 23:03

์ด ๊ธ€์€ ์ œ๊ฐ€ ์ดํ•ดํ•œ ๊ฐœ๋…์„ ๋ฐ”ํƒ•์œผ๋กœ ์ž‘์„ฑํ•˜์˜€๊ธฐ์— ํ‹€๋ฆฐ ๋ถ€๋ถ„์ด ์žˆ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํ‹€๋ฆฐ ๋ถ€๋ถ„ ์žˆ๋‹ค๋ฉด ์ง€์ ํ•ด์ฃผ์„ธ์š” :) ์Šคํ”„๋ง์—์„œ ๋งํ•˜๋Š” ์ปจํ…์ŠคํŠธ(context)๋Š” ์Šคํ”„๋ง์ด ๊ด€๋ฆฌํ•˜๋Š” ๋นˆ๋“ค์ด ๋‹ด๊ฒจ ์žˆ๋Š” ์ปจํ…Œ์ด๋„ˆ ๋ผ๊ณ  ์ƒ๊ฐํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์Šคํ”„๋ง์„ ๊ณ„์† ๊ณต๋ถ€์ค‘์ด์ง€๋งŒ ์—„์ฒญ ํ—ท๊ฐˆ๋ ธ๋˜ ๋ถ€๋ถ„์ด WebApplicationContext์™€ ApplicationContext์˜ ๊ด€๊ณ„, web.xml์—์„œ์˜ servlet-context์™€ root-context์˜ ๊ด€๊ณ„ ๊ทธ๋ฆฌ๊ณ  ContextLoaderListenter์™€ dispatcher-servlet์˜ ๊ด€๊ณ„ ์ด ์ด 3๊ฐœ์˜ ๊ด€๊ณ„๊ฐ€ ๋ณผ๋•Œ๋งˆ๋‹ค ํ—ท๊ฐˆ๋ ธ์Šต๋‹ˆ๋‹ค. # root-context ์™€ sevlet-context ํ๋ฆ„ ์ด ๊ธ€์€ WAC์™€ AC ๊ด€๋ จ ๊ธ€์ด ์•„๋‹ˆ๋ฏ€๋กœ root-context์™€ ..

profile on loading

Loading...