Spring boot Scheduler 구현하기
Java/spring2022. 6. 7. 17:53Spring boot Scheduler 구현하기

사내에서 자정에 캠페인의 state 값들을 변경하기 위한 스케줄링 시스템이 필요하여 구현해 보았다. 스케줄러 기능 활성화 Spring boot는 지원하는 스케줄러가 존재하기 때문에 간단하게 활용할 수 있다. 기본적으로 프로젝트 Application 안에 @EnableScheduling 어노테이션을 사용하면 기능 활성화를 할 수 있다. @SpringBootApplication @EnableScheduling public class Application { public static void main(String[] args) throws ParseException, JsonProcessingException { SpringApplication.run(Application.class, args); } } 스케..

image