
์คํ๋ง ์ปจํ ์ด๋
/์คํ๋ง ์ปจํ
์ด๋ ์์ฑ
ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
ApplicationContext ๊ฐ ๋ฐ๋ก ์คํ๋ง ์ปจํ ์ด๋์ด๋ค

๊ณ ์ด๊ณ ์ด ์ ๋ณด๋ฅผ ๋ชจ์์ ์ด๋ฅผ ์คํ๋ง์์ ์ฌ์ฉํ๋ ์คํ๋ง ๋น ํํ๋ก ์ปจํ ์ด๋์์ ๊ด๋ฆฌํ๋ค.

ํํ ๋งํ๋ BeanFactory๋ ์ด๋ฐ ApplicationContext์ ์ต์์ ์ธํฐํ์ด์ค์ด๋ค.
ํ์ง๋ง ๋ ๋ง์ ๊ธฐ๋ฅ์ ์ํด ์ฃผ๋ก AnnotationConfig, ApplicationContext๋ฅผ ์ฌ์ฉํ๋ค.
- locale, ํ๊ฒฝ ๋ณ์, ์ ํ๋ฆฌ์ผ์ด์ ์ด๋ฒคํธ, ๋ ๋์ ๋ฆฌ์์ค ์กฐํ ๋ฑ๋ฑ...
์คํ๋ง ๋น

๊ทธ๋ ๋ค๋ฉด Bean ์ด๋ ๋ฌด์์ธ๊ฐ?
๊ทธ๋ฌ๋ฉด์ AppConfig ***, ์์ ์ป์ BeanDefinition ์ ํตํด ์คํ๋ง ๋น์ ์์ฑํด๋ธ๋ค.
์ฌ์ฉ์๊ฐ ๊ตฌํํ ๊ฐ์ฒด๋ฅผ Spring์ด ๋ฐ์ดํธ ์กฐ์์ ํ์ฌ ํด๋น ๊ฐ์ฒด๋ฅผ ์์๋ฐ์ ํํ๋ก ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ค.
๋ค์ ๊ฐ์๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์์ฑํ์ต๋๋ค.
https://www.inflearn.com/course/์คํ๋ง-ํต์ฌ-์๋ฆฌ-๊ธฐ๋ณธํธ
'๐ Backend' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Security] ์คํ๋ง ์ํ๋ฆฌํฐ (0) | 2024.02.27 |
---|---|
[Spring Basic] ์คํ๋ง ์ฑ๊ธํค (0) | 2024.01.18 |
[Spring Basic] IoC์ DI (0) | 2024.01.18 |
[Spring Basic] ๊ฐ์ฒด ์งํฅ ์ค๊ณ์ ์คํ๋ง (0) | 2024.01.18 |
CKA ํฉ๊ฒฉ ํ๊ธฐ (0) | 2023.07.30 |