Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- deleteById
- Item04
- java
- JPA
- Proxy Patter
- 데이터베이스
- 이펙티브 자바
- Spring Boot
- @Valid
- multi module
- Web
- db
- springboot
- 플라이웨이트
- @ControllerAdvice
- Service Locator
- 트랜잭션
- Connection Pool
- @MockBean
- restTemplate
- Effective Java
- Effetive Java
- NotBlank
- NotEmpty
- Service Locator 패턴
- 디자인 패턴
- SQL 삽입 공격
- FCM
- Firebase
- @SpyBean
Archives
- Today
- Total
목록의존성 주입 (1)
NoTimeForDawdling
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/wvYRX/btq03uTQVzb/7tOdPZiid0LIb6nR0J7NGK/img.png)
Spring Boot에서 의존성 주입 방법으로 3가지가 있습니다. 지금부터 스프링의 의존성 주입 방법에 대해서 알아보겠습니다. 1. 생성자 주입(Constructor Injection) 생성자 주입 방법은 Spring framework reference에서 가장 권장하는 방법입니다. @Service public class SampleService { private final SampleRepository sampleRepository; @Autowired public SampleService(SampleRepository sampleRepository) { this.sampleRepository = sampleRepository; } } 생성자에 @Autowired 애너테이션을 붙여 의존성을 주입받을 수..
SpringBoot
2021. 3. 25. 15:10