xxl-job
xxl-job copied to clipboard
异构语言执行器使用 RESTful API 没有收到来自 xxl-job-admin 的心跳检查请求, 这是为什么
使用的是 xxl-job 2.3.0 版本, 执行器端实现 RESTful API 的 Demo 代码如下 执行器地址试过 localhost:8888 和末尾不带斜杠的 http://localhost:8888 都不行
@RestController public class DemoController {
@RequestMapping("reg") public void reg() { AdminBiz adminBiz = new AdminBizClient("http://localhost:8080/xxl-job-admin/", ""); // 下面 http://localhost:8888/ 这个执行器地址试过 localhost:8888 和末尾不带斜杠的 http://localhost:8888 都不行 RegistryParam registryParam = new RegistryParam(RegistryConfig.RegistType.EXECUTOR.name(), "demo", "http://localhost:8888/"); ReturnT<String> returnT = adminBiz.registry(registryParam); System.err.println("reg : " + returnT); }
@PostMapping("beat") public Map<String, Object> beat() { System.err.println("收到<心跳检查>请求"); Map<String, Object> result = new HashMap<>(); result.put("code", 200); result.put("msg", null); return result; }
@PostMapping("idleBeat") public Map<String, Object> idleBeat() { System.err.println("收到<manglu检查>请求"); Map<String, Object> result = new HashMap<>(); result.put("code", 200); result.put("msg", null); return result; }
@PostMapping("run")
public Map<String, Object> run() {
System.err.println("收到
@PostMapping("log")
public Map<String, Object> log() {
System.err.println("收到
@PostMapping("kill")
public Map<String, Object> kill() {
System.err.println("收到