반응형 Resource1 @Resource 관련 이전 포스팅에서 Autowired 관련해서 다룬 글이 있다. 자세한 내용은 아래 참고 포스팅 참고 바란다. 포스팅에서 다룰 Resource 랑 공통점은 의존성을 주입 받기 위한 annotation이다. 그럼 둘의 차이에 대해서 알아보면 Autowired Resource 출처 Spring Framework 표준자바 import org.springframework.beans.factory.annotation.Autowired javax.annotation.Resource bean 검색 시 타입 우선 검색 이름 우선 검색 이름 지정 @Autowired @Qualifier("test") @Resource(name = "test") 의 차이들이 있다. 여기서 주요하게 봐야하는것은 bean 검색시 타입 우선과 이름.. 2023. 9. 22. 이전 1 다음 반응형