티스토리 뷰
1. 버전 pom.xml
<spring.maven.artifact.version>4.3.16.RELEASE</spring.maven.artifact.version>
<egovframework.rte.version>3.8.0</egovframework.rte.version>
2. context-task.xml
<?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/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd">
<context:component-scan base-package="egovframework.test.task.component" />
<task:annotation-driven />
</beans>
3. TaskTest.java
package egovframework.test.task.component;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
public class TestTask {
@Scheduled(cron="0/30 * * * * *") //매 0초 30초에 실행
public void test1() throws Exception {
System.out.println("task run");
}
}
끝.
'웹개발자 > java' 카테고리의 다른 글
이미지 업로드 가로 세로 회전 현상 처리 (0) | 2020.03.01 |
---|---|
java 썸네일 생성 (0) | 2020.03.01 |
java ArrayList Queue에 넣기 (0) | 2019.11.07 |
spring boot welcome page 설정 (0) | 2019.10.18 |
웹취약점 세션 플래그 미설정, Secure Cookies 설정 (0) | 2019.04.02 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 호이안
- download
- 블루스택
- 시즌3
- nginx
- Spring
- 윈도우
- Spring Boot
- 전자정부프레임워크
- eGovFramework
- mysql
- 배드워즈
- 베트남
- 다운로드
- 시즌패스
- 라즈베리파이
- 달빛조각사
- 설정
- 단축키
- autohotkey
- java
- mariaDB
- tomcat
- 오토핫키
- lineage2m
- 로블록스
- 메소드 제한
- 설치
- 구글 플레이 게임즈
- 수원
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
글 보관함