hou27의 블로그

  • 홈
  • 태그
  • 방명록

SpringConfig 1

Spring Bean 등록하기 - 2가지 방법

Spring Bean 등록 1. 컴포넌트 스캔 원리 @Component annotation 이 있으면 스프링 빈으로 자동 등록됨. Component Scan 은 ComponentScan annotation 가 붙은 package의 하위 package 들을 대상으로 살핀다. (SpringBootApplication annotation 내부에 ComponentScan annotation 존재) 다음 annotation 들은 @Component annotation 가 등록되어있다. @Controller @Service @Repository 스프링은 spring container에 spring bean을 등록할 때, 기본으로 싱글톤으로 등록한다 따라서 같은 스프링 빈이면 모두 같은 인스턴스다. (설정으로 싱글톤..

Backend/Spring 2022.05.03
1
더보기
프로필사진

방문자수Total

  • Today :
  • Yesterday :
  • 분류 전체보기 (64)
    • Blockchain (9)
    • Dev (14)
    • Problem Solving (9)
    • 개발 일지 (6)
    • Refactoring (0)
    • Data Science (2)
    • Backend (16)
      • NestJS (7)
      • Spring (9)
    • Study (8)
      • TDD (8)

Tag

알고리즘, Baekjoon, WSL, react, nestjs, jwt, PS, 테스트 주도 개발, 암호화폐, 백준, typeORM, TDD, Spring, Linux, go, cryptocurrency, Java, Blockchain, spring boot, WSL2,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/06   »
일 월 화 수 목 금 토
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

Copyright © Kakao Corp. All rights reserved.

티스토리툴바