From 670f3a5fa2631fc989ac196d6d9257f54bf77c97 Mon Sep 17 00:00:00 2001 From: SeoJin Kim Date: Mon, 26 Jul 2021 00:33:11 +0900 Subject: [PATCH] =?UTF-8?q?[Spring][=EC=87=BC=ED=95=91=EB=AA=B0=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8][29]=20=EC=83=81=ED=92=88?= =?UTF-8?q?=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=88=98=EC=A0=95=20-=204(?= =?UTF-8?q?=EB=B0=B0=EC=B9=98=20=ED=94=84=EB=A1=9C=EA=B7=B8=EB=9E=A8=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://kimvampa.tistory.com/238 --- VamPa/pom.xml | 14 ++++++++++++ .../src/main/java/com/vam/task/testBatch.java | 22 +++++++++++++++++++ .../webapp/WEB-INF/spring/root-context.xml | 5 +++++ .../maven/com.vam/controller/pom.properties | 2 +- .../META-INF/maven/com.vam/controller/pom.xml | 14 ++++++++++++ VamPa_MySQL/pom.xml | 14 ++++++++++++ .../webapp/WEB-INF/spring/root-context.xml | 5 +++++ .../maven/com.vam/controller/pom.properties | 2 +- .../META-INF/maven/com.vam/controller/pom.xml | 14 ++++++++++++ 9 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 VamPa/src/main/java/com/vam/task/testBatch.java diff --git a/VamPa/pom.xml b/VamPa/pom.xml index 21865e6..1776e29 100644 --- a/VamPa/pom.xml +++ b/VamPa/pom.xml @@ -244,6 +244,20 @@ thumbnailator 0.4.13 + + + + org.quartz-scheduler + quartz-jobs + 2.3.2 + + + + org.quartz-scheduler + quartz + 2.3.2 + + diff --git a/VamPa/src/main/java/com/vam/task/testBatch.java b/VamPa/src/main/java/com/vam/task/testBatch.java new file mode 100644 index 0000000..9b7291d --- /dev/null +++ b/VamPa/src/main/java/com/vam/task/testBatch.java @@ -0,0 +1,22 @@ +package com.vam.task; + +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import lombok.extern.log4j.Log4j; + +@Component +@Log4j +public class testBatch { + + + @Scheduled(cron = "0 * * * * *") + public void testMethod() throws Exception{ + + log.warn("배치 실행 테스트......."); + log.warn("==================================="); + + + } + +} diff --git a/VamPa/src/main/webapp/WEB-INF/spring/root-context.xml b/VamPa/src/main/webapp/WEB-INF/spring/root-context.xml index 6c8fb70..4692b80 100644 --- a/VamPa/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/VamPa/src/main/webapp/WEB-INF/spring/root-context.xml @@ -4,7 +4,9 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring" xmlns:tx="http://www.springframework.org/schema/tx" + xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation="http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd + http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.3.xsd http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"> @@ -51,12 +53,15 @@ + + + diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index 6ca05fc..9eb479e 100644 --- a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Tue Jul 20 15:40:19 KST 2021 +#Sun Jul 25 23:04:40 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project2\\VamPa m2e.projectName=VamPa groupId=com.vam diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml index 21865e6..1776e29 100644 --- a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml @@ -244,6 +244,20 @@ thumbnailator 0.4.13 + + + + org.quartz-scheduler + quartz-jobs + 2.3.2 + + + + org.quartz-scheduler + quartz + 2.3.2 + + diff --git a/VamPa_MySQL/pom.xml b/VamPa_MySQL/pom.xml index 5eabfb5..0f17332 100644 --- a/VamPa_MySQL/pom.xml +++ b/VamPa_MySQL/pom.xml @@ -243,7 +243,21 @@ net.coobird thumbnailator 0.4.13 + + + + + org.quartz-scheduler + quartz-jobs + 2.3.2 + + + + org.quartz-scheduler + quartz + 2.3.2 + diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/spring/root-context.xml b/VamPa_MySQL/src/main/webapp/WEB-INF/spring/root-context.xml index 41ac2e2..f82e412 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/spring/root-context.xml @@ -4,7 +4,9 @@ xmlns:context="http://www.springframework.org/schema/context" xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring" xmlns:tx="http://www.springframework.org/schema/tx" + xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation="http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd + http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.3.xsd http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd"> @@ -50,11 +52,14 @@ + + + diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index f61e169..076ecac 100644 --- a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Tue Jul 20 15:40:20 KST 2021 +#Sun Jul 25 23:15:48 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project2\\VamPa_MySQL m2e.projectName=VamPa_MySQL groupId=com.vam diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml index 5eabfb5..0f17332 100644 --- a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.xml @@ -243,7 +243,21 @@ net.coobird thumbnailator 0.4.13 + + + + + org.quartz-scheduler + quartz-jobs + 2.3.2 + + + + org.quartz-scheduler + quartz + 2.3.2 +