ApplicationContext (1) 썸네일형 리스트형 Spring - ApplicationContext,ApplicationContextAware, 빈이 아닌 객체에 빈주입할때! Spring - ApplicationContext,ApplicationContextAware, 빈이 아닌 객체에 빈주입할때! @Autuwired,@Inject 등의 어노테이션으로 의존주입을 하기 위해서는 해당 객체가 빈으로 등록되어 있어야만 가능하다.사실 이런 상황은 웹프로그래밍에서는 거의 없겠지만... 빈으로 등록되지 않은 객체에 빈으로 등록된 객체를 의존주입해야할 상황이 있을 수도 있다. 그럴때 사용할수 있는 하나의 UtilClass 이다. 123456789101112131415@Servicepublic class BeanUtils implements ApplicationContextAware { private static ApplicationContext context; @Override publi.. 이전 1 다음