feat:定时任务

This commit is contained in:
Xiang
2026-01-15 17:31:07 +08:00
parent 15cefd3db6
commit cef2662302
5 changed files with 22 additions and 39 deletions

View File

@@ -44,7 +44,7 @@
<dependency>
<groupId>com.xiang.starter</groupId>
<artifactId>xmc-http-starter</artifactId>
<version>1.0</version>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.xiang.starter</groupId>

View File

@@ -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框架");
}
}

View File

@@ -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");
}
}

View File

@@ -7,11 +7,13 @@ import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.ComponentScan;
/**
* @Author: xiang
* @Date: 2026-01-04 14:20
*/
@ComponentScan(basePackages = {"com.xiang.*"})
@SpringBootApplication
@ConfigurationPropertiesScan(basePackages = {
"com.xiang.xservice.logger",

View File

@@ -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续期定时任务启动!!!");
}
}