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
- java
- 파이썬
- 백준 19238
- java 기술면접
- 백준 17626
- 백준 17779
- with recursive
- Kotlin
- 웹어플리케이션 서버
- springboot
- Spring
- MSA
- spring security
- spring cloud
- Spring Boot
- sql 기술면접
- 프로그래머스
- 백준 16236
- 백준 16235
- JPA
- 백준 15685
- JVM
- re.split
- 백준
- MySQL
- 백준 파이썬
- spring oauth
- Coroutine
- 백준 16719
- 프로래머스
Archives
- Today
- Total
목록spring DI (1)
시작이 반
[Spring] 의존관계 주입 방법
@Autowired를 통한 의존관계 주입 생성자 주입 수정자 주입(setter 주입) 필드 주입 일반 메서드 주입 생성자 주입 - 생성자 호출시점에 1번만 호출되는 것이 보장 - 불변, 필수 의존관계에 사용 - 해당 class가 빈으로 등록되어 있고 생성자가 한개 있을때 @Autowired 생략 가능 @Component public class MemberServiceImpl implements MemberService{ private final MemberRepository memberRepository; @Autowired public MemberServiceImpl(MemberRepository memberRepository) { this.memberRepository = memberRepositor..
Programming/Spring
2021. 5. 13. 23:59