Spring
Spring Boot - 등록된 Bean 객체 사용하기
Gil Granger
2019. 12. 17. 11:02
빈으로 등록하지 않아 스피링 빈으로 주입하지 않은 객체을 생성할때 Bean 에 등록된 객체를 불러오고 싶을때가 있다.
그럴경우 ApplicationContextAware 인터페이스를 구현한 클래스를 빈으로 등록하여 사용하면 된다.


이런식으로 유틸로도 활용할 수 있다.