Burninghering's Blog
article thumbnail
Spring - 강한 결합, 제어의 역전(IoC), 의존성 주입(DI)
CodingTest 2023. 2. 14. 22:44

이 글은 스파르타 코딩클럽 웹개발 심화반 강의를 듣고 작성하였습니다. "강한 결합" 이해를 위한 예제 Contoller1 이 Service1 객체를 생성하여 사용 public class Controller1 { private final Service1 service1; public Controller1() { this.service1 = new Service1(); } } Service1 이 Repostiroy1 객체를 생성하여 사용 public class Service1 { private final Repository1 repository1; public Service1() { this.repository1 = new Repository1(); } } Repostiroy1 객체 선언 public cla..