모델2 기반으로 애플리케이션을 개발할 경우 개발과 유지관리가 모델1 방식보다 쉬움. 하지만 새로운 애플리케이션을 개발할 때마다 일일이 처음부터 다시 개발해야 한다는 단점이 있음. 모든 웹 애플리케이션에서 필요한 공통 기능들을 각각 처음부터 다시 개발해야 한다는 것은 비
자바와 같은 객체 지향 프로그랭밍 언어에서 클래스는 특정 기능을 수행하는 부품 역할을 함. 우리가 살아가는 현실 세계에서도 어떤 부품을 사용하다가 이상이 있거나 오래 되면 다른 부품으로 교체해서 사용함.마찬가지로 애플리케이션에서도 사용자의 요구 사항에 따라 클래스 기능
의존성 주입의 두 방법인 setter를 이용한 방식과 생성자를 이용한 방식을 각각 실습을 통해 확인해 보겠음. 먼저 setter를 이용해 di를 실습하는 방식부터 알아봄.