๐ฉ ์์ฑ์ ์์กด์ฑ ์ฃผ์ [ DI ] ์ ์จ์ผํ๋ ์ด์ ์ ๋ฒ ๊ธ์์ ์์กด์ฑ ์ฃผ์ ์ ๋ํด ์ค๋ช ํ์๋ค. ํ๋ ์ฃผ์ , ์์ ์ ์ฃผ์ , ์์ฑ์ ์ฃผ์ ์ ์ค๋ช ํ์๋๋ฐ ์ด ์ค ์์ฑ์ ์ฃผ์ ์ ์จ์ผํ๋ ์ด์ ๋ฅผ ์ค๋ช ํ ๊ฒ์ด๋ค. ์์ฑ์ ์ฃผ์ (Constructor Injection)์ ์์ฑ์๋ฅผ ํตํด ์์กด ๊ด๊ณ๋ฅผ ์ฃผ์ ํ๋ ๋ฐฉ๋ฒ์ด๋ค. @Controller public class ControllerTest{ IServiceTest service; @Autowired public Controller(IServiceTest service){ this.service = service; } ์ ์์ฑ์ ์ฃผ์ ์ ์ฌ์ฉํด์ผ ํ ๊น? ์์ฑ์ ์ฃผ์ ์ ์์ฑ์์ ํธ์ถ ์์ ์ 1ํ ํธ์ถ ๋๋ ๊ฒ์ด ๋ณด์ฅ๋๋ค. ๊ทธ๋ฌ๋ฏ๋ก ์ฃผ์ ๋ฐ์ ๊ฐ์ฒด๊ฐ ๋ณํ์ง ์๊ฑฐ๋ ๋ฐ๋์ ๊ฐ์ฒด..