본문 바로가기

HJW's IT Blog

검색하기
HJW's IT Blog
프로필사진 kiki1875

  • 분류 전체보기 (179)
    • 개발 개념 (10)
    • NestJS (0)
    • 컴퓨터 네트워크 (19)
    • 알고리즘 (15)
    • OS (14)
    • Algorithm (41)
    • Database (6)
    • WEB (0)
    • 정보보호 (8)
    • Spring (20)
    • Java (10)
    • AWS (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2024/12   »
일 월 화 수 목 금 토
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
  • spring security
  • lombok
  • Google OAuth
  • Volatile
  • synchronized
  • factory
  • builder
  • 일급 컬렉션
  • java
  • 일급 객체
  • Spring
  • Dependency Injection
  • OAuth 2.0
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록2024/12/04 (1)

HJW's IT Blog

컴포넌트 스캔과 의존성 자동 주입

컴포넌트 스캔 / Dependency Injection컴포넌트 스캔과 의존관계 자동 주입이전 포스팅 까지는, Spring Bean 등록시, @Bean 을 사용해 설정 정보에 직접 등록 해 주었다. 하지만, 프로젝트 규모가 커질 수록, 일일이 등록하기도 힘들고, 누락하는 문제도 발생한다. 이번 포스팅에선, 자동으로 Spring Bean 을 등록하는 방법에 대해 알아보자우선, AutoAppConfig.java 파일을 생성.package hello.core;import org.springframework.context.annotation.ComponentScan;import org.springframework.context.annotation.Configuration;import org.springframew..

Spring 2024. 12. 4. 11:30
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바