BeanLifeCycle [http://whiteship.me/791]에 등장하는 여러 인터페이스 들 중에서 BeanFactoryAware,
ApplicationContextAware, MessageSoruceAware, ApplicationEventPublisherAware,
ResourceLoaderAware 인터페이스를 사용하지 않고도 이들이 해주는 일과 똑같은 작업을 할 수 있습니다.
@Component
public class Bean {
@Autowired
ApplicationContext applicationContext;
@Autowired
MessageSource messageSource;
@Autowired
ApplicationEventPublisher applicationEventPublisher;
@Autowired
ResourceLoader resourceLoader;
@Autowired
BeanFactory beanFactory;
}
이런식으로