Spring Bean 생성 및 주입 방법에는 여러가지가 있다. Spring Framework 특성상 IoC 컨테이너인 ApplicationContext(통용되는 이름) 이 생성한다. 이 때 xml로 설정하는 방법도 있지만, Spring 3.1 이상부터는 Annotation을 많이 활용한다. Annotation에는 아래와 같이 존재한다. @Component Spring 컨테이너에게 Bean 생성 대상임을 알리는 Annotation이다. 해당 Annotation이 있으면 스프링 컨테이너는 해당 클래스를 Bean으로 생성한다. @Service 현재로서는 @Component와 차이가 없다. 다만 해당 클래스가 Service Layer 임을 명시적으로 알릴 수 있으니, 목적에 맞게 @Component와는 구분하여..
http://forum.spring.io/forum/spring-projects/container/40092-autowired-and-resource-difference @Autowired Bean 타입기준@Resource Bean 이름 기준 see chapter 3.11.1 of Reference Doc:http://docs.spring.io/spring/docs/2.5.x/reference/beans.html#beans-autowired-annotation and chapetr 3.11.3 of Reference Doc:http://docs.spring.io/spring/docs/2.5.x/reference/beans.html#beans-resource-annotation
- Total
- Today
- Yesterday
- Git
- jenkins2.0
- PYTHON
- bigdata
- Django
- linux
- 태그를 입력해 주세요.
- db
- spring
- mysql
- spark
- jenkins
- mongo
- Oracle
- 알고리즘
- java
- exception
- mongodb
- 책요약
- 확률분포
- json
- 데이터과학자
- Learning Spark
- HADOOP
- flume
- Apache Spark
- jackson
- 데이터 리터러시
- Sqoop
- Hdfs
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |