feat:定时任务
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -44,7 +44,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xiang.starter</groupId>
|
<groupId>com.xiang.starter</groupId>
|
||||||
<artifactId>xmc-http-starter</artifactId>
|
<artifactId>xmc-http-starter</artifactId>
|
||||||
<version>1.0</version>
|
<version>2.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xiang.starter</groupId>
|
<groupId>com.xiang.starter</groupId>
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.xiang.app.modules.jntyzx.schedule;
|
|
||||||
|
|
||||||
import com.xiang.core.quartz.annotation.XxzJob;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: xiang
|
|
||||||
* @Date: 2026-01-05 08:59
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
public class TestXxzJob {
|
|
||||||
|
|
||||||
@XxzJob(name = "TestXxzJob")
|
|
||||||
public void testXxzJob() {
|
|
||||||
log.info("测试xxz-job框架");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.xiang.app.schedule;
|
|
||||||
|
|
||||||
import com.xiang.core.quartz.annotation.XxzJob;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: xiang
|
|
||||||
* @Date: 2026-01-14 17:17
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
public class TestTask1 {
|
|
||||||
|
|
||||||
@XxzJob(name = "ts")
|
|
||||||
public void ts() {
|
|
||||||
log.info("111");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,11 +7,13 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: xiang
|
* @Author: xiang
|
||||||
* @Date: 2026-01-04 14:20
|
* @Date: 2026-01-04 14:20
|
||||||
*/
|
*/
|
||||||
|
@ComponentScan(basePackages = {"com.xiang.*"})
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@ConfigurationPropertiesScan(basePackages = {
|
@ConfigurationPropertiesScan(basePackages = {
|
||||||
"com.xiang.xservice.logger",
|
"com.xiang.xservice.logger",
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.xiang.app.schedule.jntyzx;
|
||||||
|
|
||||||
|
import com.xiang.core.quartz.annotation.XxzJob;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: xiang
|
||||||
|
* @Date: 2026-01-15 17:29
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class JtTokenRefreshTask {
|
||||||
|
|
||||||
|
@XxzJob(name = "jtTokenRefreshHandler")
|
||||||
|
public void handle() {
|
||||||
|
log.info("【Token】江南体育中心token续期定时任务启动!!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user