IOC Container(*.xml)
<task:annotation-driven/>
@Component
public class test{
/**
* 왼쪽부터 작은 단위 [초 분 시 일 월 요일 년(생략가능)]
*/
@Scheduled(cron="0 */1 * * * *")
public void wqCheck() {
}
}
스케쥴러 사용이유 : 주기적인 작업이 필요 할 때 사용한다.
'낙서장 > Spring' 카테고리의 다른 글
Spring PDF 파일 ResponseEntity로 보여주기 (0) | 2021.09.23 |
---|---|
Oracle DataBase PDF파일 값 넣기!! (0) | 2021.09.07 |
Spring 다른 서버에 파일 보내기(FTP) (0) | 2021.09.07 |
Spring Project Setting (0) | 2021.08.19 |
Spring Ajax JSON Encoding (0) | 2021.08.12 |