Skip to content

Commit 61ffdb2

Browse files
committed
di
1 parent bd9679e commit 61ffdb2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Spring/특징.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
Layer, service 간에 dependency가 존재하는 경우 spring이 서로 연결해주는 역할을 한다.
1010

11-
Spring에는 `@Autowired` annotation을 통해 dependency injection을 구현할 수 있다. `@Autowired` field, constructor, setter method에 적용할 수 있으며, spring은 해당 위치에 알맞은 dependency를 자동으로 주입한다.
11+
Spring에는 `@Autowired` annotation을 통해 dependency injection을 구현할 수 있다. `@Autowired` field, constructor, setter method에 적용할 수 있으며, spring container가 해당하는 bean 객체를 찾아서 알맞은 dependency를 자동으로 주입한다.
1212

1313
1. field injection
1414

15-
Field에 바로 `@Autowired` annotation을 붙여 dependency를 주입하는 방식이다.
15+
Field에 바로 `@Autowired` 붙여 dependency를 주입하는 방식이다.
1616

1717
```java
1818
@Service
@@ -29,7 +29,7 @@
2929

3030
2. constructor injection
3131

32-
Class의 constructor에 `@Autowired` annotation을 붙여 dependency를 주입하는 방식이다.
32+
Class의 constructor에 `@Autowired` 붙여 dependency를 주입하는 방식이다.
3333

3434
```java
3535
@Service
@@ -56,7 +56,7 @@
5656

5757
3. setter injection
5858

59-
Class의 setter method에 `@Autowired` annotation을 붙여 dependency를 주입하는 방식이다.
59+
Class의 setter method에 `@Autowired` 붙여 dependency를 주입하는 방식이다.
6060

6161
```java
6262
@Service

0 commit comments

Comments
 (0)