티스토리 뷰
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
- 수원
- 다운로드
- java
- 시즌3
- 단축키
- 달빛조각사
- Spring
- 설정
- mysql
- 베트남
- autohotkey
- 윈도우
- Spring Boot
- 블루스택
- 전자정부프레임워크
- 배드워즈
- 시즌패스
- tomcat
- lineage2m
- 오토핫키
- 라즈베리파이
- 설치
- 로블록스
- 구글 플레이 게임즈
- download
- 호이안
- mariaDB
- 메소드 제한
- eGovFramework
- nginx
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함