본문 바로가기

NoTimeForDawdling

검색하기
NoTimeForDawdling
프로필사진 Room_Energy

  • 분류 전체보기 (64)
    • Java (15)
    • SpringBoot (16)
    • DB (9)
    • Effective Java (7)
    • Design Pattern (7)
    • Error (1)
    • JPA (4)
    • Web (3)
    • 운영체제 (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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
  • 이펙티브 자바
  • springboot
  • deleteById
  • Item04
  • Firebase
  • @Valid
  • @MockBean
  • JPA
  • Service Locator
  • 데이터베이스
  • restTemplate
  • Web
  • NotEmpty
  • @SpyBean
  • 트랜잭션
  • Effetive Java
  • SQL 삽입 공격
  • 플라이웨이트
  • Effective Java
  • FCM
  • Spring Boot
  • Proxy Patter
  • NotBlank
  • 디자인 패턴
  • Service Locator 패턴
  • Connection Pool
  • multi module
  • @ControllerAdvice
  • java
  • db
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록dependency (1)

NoTimeForDawdling

Spring Boot 의존성 주입 방법

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
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바