feat:测试xxzJob
This commit is contained in:
4
pom.xml
4
pom.xml
@@ -53,8 +53,8 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.xiang.starter</groupId>
|
||||
<artifactId>xmc-quartz-starter</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<artifactId>xservice-quartz-core</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.xiang.starter</groupId>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.xiang.app.modules.jntyzx.schedule;
|
||||
|
||||
import com.xiang.xmc.service.quartz.annotation.XxzJob;
|
||||
import com.xiang.core.quartz.annotation.XxzJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.xiang.app;
|
||||
|
||||
import com.xiang.xmc.service.quartz.annotation.EnableXxzJob;
|
||||
import com.xiang.core.quartz.annotation.EnableXxzJob;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -18,10 +18,9 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||
"com.xiang.app.common.config",
|
||||
})
|
||||
@MapperScan(basePackages = {
|
||||
"com.xiang.xmc.service.quartz",
|
||||
"com.xiang.app.modules.*.mapper"
|
||||
})
|
||||
@EnableXxzJob(basePackages = {"com.xiang.app.modules.*.schedule"})
|
||||
@EnableXxzJob(basePackages = {"com.xiang.app.schedule"})
|
||||
public class Application {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Application.class);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.xiang.app;
|
||||
|
||||
import com.xiang.xmc.service.quartz.domain.JobDefinition;
|
||||
import com.xiang.xmc.service.quartz.holder.JobDefinitionHolder;
|
||||
import com.xiang.core.quartz.holder.JobDefinitionHolder;
|
||||
import com.xiang.core.quartz.model.JobDefinition;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
|
||||
@@ -36,7 +36,9 @@ spring:
|
||||
min-idle: 0
|
||||
max-wait: 1000
|
||||
xxz-job:
|
||||
appName: xservice-cornucopia
|
||||
app-name: xservice-cornucopia
|
||||
admin-address: http://127.0.0.1:30030
|
||||
namespace: 1
|
||||
|
||||
dingtalk:
|
||||
robot:
|
||||
@@ -1,6 +1,6 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
active: test
|
||||
application:
|
||||
name: xservice-cornucopia
|
||||
main:
|
||||
|
||||
Reference in New Issue
Block a user