Description ๐น ServletContextListener ์ SpringFrameWork
Spring์ ApplicationEventPublisher๊ฐ ๋ฐํํ๋ ์ด๋ฒคํธ๋ฅผ ๊ตฌ๋
ํ๋ ์ปดํฌ๋ํธ
์คํ๋ง ํ๋ ์์ํฌ๋ฅผ ์น ํ๋ก์ ํธ์์ ๋ฏธ๋ฆฌ ๋ก๋ฉํ๋ ์์
์ ์ฒ๋ฆฌํ ๋ ServletContextListener ์ฌ์ฉ
์ด๋ฒคํธ๊ฐ ApplicationvEvent๋ฅผ ์์ํ๊ฑฐ๋, ์ผ๋ฐ ๊ฐ์ฒด(POJO)๋ก๋ ์ฌ์ฉ ๊ฐ๋ฅ
์ด๋ฒคํธ๊ฐ ๋ฐ์ํ๋ฉด ํด๋น ์ด๋ฒคํธ ํ์
์ ์ฒ๋ฆฌํ ์ ์๋ ๋ฆฌ์ค๋๊ฐ ์๋์ผ๋ก ํธ์ถ
Servlet Context์๋ setAttribute()๋ฅผ ์ด์ฉํด ์ํ๋ ์ด๋ฆ์ผ๋ก ๊ฐ์ฒด ๋ณด๊ด
์๋ธ๋ฆฟ API ์ด๋ฒคํธ ๋ฆฌ์ค๋
ํด๋น ์น ์ดํ๋ฆฌ์ผ์ด์
์ด ์์๋๊ฑฐ๋ ์ข
๋ฃ๋ ๋ ํน์ ํ ์์
์ ์ํ
ํ๋ก๊ทธ๋จ ์คํ contextInitialized
ํ๋ก๊ทธ๋จ ์ข
๋ฃ contextDestroyed
HttpSession์ ํน์ ํ ์์
์ ๋ํ ๊ฐ์์ ์ฒ๋ฆฌ
HttpSessionAttributeListener
attributeAdded()
attributeRemoved()
attributeReplaced()
HttpServletRequest์ ํน์ ํ ์์
์ ๋ํ ๊ฐ์์ ์ฒ๋ฆฌ
Reactions are currently unavailable
You canโt perform that action at this time.
๐น ServletContextListener ์ SpringFrameWork