Tag Archives: scheduled

Spring @Scheduled 스케쥴러 사용 샘플 (cron 표현식 등)

By | 8월 11, 2021

Spring Boot 라면 @EnableScheduling 을 붙여서 기본 셋팅이 가능한 것 같은데, 일반 Spring 에서는 아래와 같은 셋팅을 추가해 주어야 한다. thread pooling 관련 설정을 하기도 하는 것 같은데, 여기서는 가장 심플한 구성을 사용하기로 한다. spring context xml (‘task’ 가 포인트) <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"> <!–… Read More »