05-17 21:28
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- OOP
- Inheritance
- 리눅스
- descriptive statistics
- dbms
- Unity
- Binary Search
- 리눅스 마스터 1급
- X윈도우
- Mac
- Operator
- X.org
- BFS
- literal
- 자바
- Java
- Entity
- Physical Scheme
- selenium
- 셀레니움
- Polymolphism
- Class
- Reference Type
- python
- External Scheme
- spring
- preprocessing
- Entity Set
- 백준
- systemd
Archives
- Today
- Total
Byeol Lo
Spring IOC(Inversion of Control), DI(Dependency Injection) 본문
BackEnd/Spring
Spring IOC(Inversion of Control), DI(Dependency Injection)
알 수 없는 사용자 2022. 8. 30. 17:40의존성 주입이란 스프링이 다른 프레임워크와 차별화되어 제공하는 의존 관계 주입 기능으로 객체를 직접 생성하는게 아니라 외부에서 생성한 후 주입시켜주는 방식이다. 즉, human 객체에서 animal 객체를 생성하는게 아니라, 외부(IOC 컨테이너) 에서 생성된 animal 객체를 주입시켜 setter 혹은 생성자를 통해 사용하는 방식이다.
Spring에서는 객체를 Bean이라고 부르고, 프로젝트가 실행될 때 객체가 생성되는 곳을 스프링에서는 Bean Container라고 부른다.
IOC
메소드나 객체의 호출작업을 외부에서 하는 것을 의미한다.
'BackEnd > Spring' 카테고리의 다른 글
Spring - MVC와 템플릿 엔진 (0) | 2022.08.28 |
---|---|
Spring - static 폴더 (0) | 2022.08.24 |
build.gradlew (0) | 2022.08.24 |
Spring 시작하기 (0) | 2022.08.21 |
Comments