BackEnd/Spring
-
Inflearn Spring Framework 입문BackEnd/Spring 2023. 10. 20. 21:19
백기선님의 Spring Framework 입문 강의를 수강하며 간단히 정리한 내용입니다. 🌵 IoC 위 코드와 아래 코드를 비교해보자. class OwnerController { private OwnerRepository repository = new OwnerRepository(); } class OwnerController { private OwnerRepository repository; public OwnerController(OwnerRepository repository) { this.repository = repository; } } 위의 코드 OwnerController는 자기가 필요한 OwnerRepository를 직접 new로 생성해서 사용한다. 내가 사용할 것은 내가 만들어서 쓴다 :..
-
-
-
-
-
-
-