본문 바로가기
Programing/Spring

@Resource VS @Autowired

by Tomining 2015. 3. 12.

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