Spring Boot Custom PostConstruct 만들기

2024-02-01 목요일

계기 개발을 하다 보면 Bean이 아닌 클래스인데 Bean을 참조해야 하는 경우가 있다. 그런 경우 이런 방식으로 ApplicationContextProvider를 만들어 주면 된다. Spring Bean이 아닌 클래스에서 Bean 가져오기 Spring Boot가 실행될 때는 ApplicationContext가 인 상황이 없을 줄 알았다. 하지만 개발 중…

© ZungTa Devlog, Built with Gatsby