본문 바로가기 메뉴 바로가기

Studying programming

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Studying programming

검색하기 폼
  • Jimin's Programming (194)
    • Algorithms (54)
    • JavaScript (16)
    • Vue.js (3)
    • Node.js (3)
    • React.js (7)
    • React Native (0)
    • Spring Boot (13)
    • JAVA (58)
    • C++ (17)
    • Programming (19)
    • Computer basics (4)
  • 방명록

@Bean (1)
객체주입 annotation 의 차이

'@Bean' and '@Autowired' annotation in Spring Boot * Spring Boot 에서 bean 은 객체를 의미한다. 두 annotation 은 객체를 불러주기에 비슷해 보이지만 큰 차이가 있다. 바로 @Bean annotation은 Class 내에 객체를 먼저 '생성' 시키고 만들어진 객체를 부르는 반면 @Autowired annotation 은 이미 이전에 '만들어진' 객체를 불러오는 기능만은 담당하기 때문이다. 그래서 객체를 미리 생성하지 않고 @Autowired annotation을 사용한다면 앞서 만들어 놓은 객체가 없기 때문에 에러를 발생시킨다. '@Resource' and '@Autowired' @Autowire는 Bean을 불러올때 같은 type을 기준으로..

Spring Boot 2019. 1. 5. 07:18
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Javascript Algorithm
  • 프로그래머스
  • HashMap
  • easy algorithm
  • math.abs
  • hackerrank
  • Collection Framework
  • hackerrank javascript solution
  • compareTo()
  • javascript
  • rest parameter
  • repeat()
  • 프로그래머스 알고리즘문제
  • algorithm
  • string class in java
  • Object type casting
  • C++
  • math.max
  • substring()
  • easy javascript algorithm
  • hackerrank javascript
  • HackerRank Algorithm
  • equals()
  • hackerrank solution
  • ... in Javascript
  • code refactoring
  • java
  • 알고리즘
  • spring boot application
  • 프로그래머스 알고리즘
more
«   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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바