启动项目
This commit is contained in:
@@ -12,6 +12,7 @@ import io.swagger.annotations.Api;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.InetAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -54,6 +55,16 @@ public class TbTaskController extends BaseController<TbTask> {
|
||||
return "操作成功";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ip开启定时任务
|
||||
* http://localhost:10085/tbTask
|
||||
*/
|
||||
@GetMapping("startByIp/{taskId}")
|
||||
public String startByIp() throws Exception{
|
||||
schedulerConf.startByIp();
|
||||
return "操作成功";
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新一个动态定时任务
|
||||
* http://localhost:10085/tbTask/save?taskId=2&taskExp=0/2 * * * * ?&taskClass=cn.huanzi.qch.springboottimer.task.MyRunnable3
|
||||
|
||||
@@ -45,6 +45,9 @@ public class TbTask extends BaseEntity {
|
||||
@ApiModelProperty(value = "定时任务状态,0停用 1启用")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "ip地址")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty(value = "定时任务的Runnable任务类完整路径")
|
||||
private String taskClass;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user