求问,“立即执行一次”的restful api如何调用
Closed this issue · 2 comments
iamlake commented
SKTT1Fiver commented
public XxlJobResult xxlJobRun(int jobId, String executorParam) {
String adminAddresses = 地址
String url=adminAddresses+"/jobinfo/trigger";
String body;
try (HttpResponse response = HttpRequest.post(url)
.form("id", jobId)
.form("executorParam", executorParam)
.cookie(设置一个cookie)
.execute()) {
body = response.body();
}
return JSONUtil.parse(body).toBean(XxlJobResult.class);
}
iamlake commented
感谢,简单明了