[spring boot] @Component 선언한 class 파일 불러오는 방법

@Component 선언한 class 파일 불러오는 방법

예)

@Component
public class Scheduler {
}

라고 작성한 class 파일이있을때,

Scheduler s = ApplicationContextLocator.getApplicationContext().getBean(Scheduler.class);

처럼 class를 불러올수 있다.


댓글

이 블로그의 인기 게시물

[비트모빅] 1월 11일 비트모빅 대전환! '뉴 베드포드' 업그레이드와 2026 로드맵 핵심 요약

[spring boot] 스프링부트에서 외부jar파일 추가 방법(배포시에도 정상적으로 추가됨)