因为core的XxlJobRemotingUtil.postBody方法里使用了
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");

而JobApiController 用的以下接收，data是接收不到数据的因为还有个uri的参数
@RequestMapping("/{uri}")
    @ResponseBody
    @PermissionLimit(limit=false)
    public ReturnT<String> api(HttpServletRequest request, @PathVariable("uri") String uri, @RequestBody(required = false) String data) 

XxlJobRemotingUtil.postBody 我这边改成了
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
connection.setRequestProperty("Accept-Charset", "application/x-www-form-urlencoded;charset=UTF-8");

请求的参数encode一下
String requestBody = URLEncoder.encode(GsonTool.toJson(requestObj), "UTF-8");

JobApiController接收时decode一下
data = URLDecoder.decode(data, Charset.forName("UTF-8"));
这样是可以注册的
2.4.0版本执行器注册调度中心400问题
This is a GitHub Issue
repo:xxl-job
owner:xuxueli
Title : 2.4.0版本执行器注册调度中心400问题
Issue date:

--- start body ---
因为core的XxlJobRemotingUtil.postBody方法里使用了
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8");

而JobApiController 用的以下接收，data是接收不到数据的因为还有个uri的参数
@RequestMapping("/{uri}")
    @ResponseBody
    @PermissionLimit(limit=false)
    public ReturnT<String> api(HttpServletRequest request, @PathVariable("uri") String uri, @RequestBody(required = false) String data) 

XxlJobRemotingUtil.postBody 我这边改成了
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
connection.setRequestProperty("Accept-Charset", "application/x-www-form-urlencoded;charset=UTF-8");

请求的参数encode一下
String requestBody = URLEncoder.encode(GsonTool.toJson(requestObj), "UTF-8");

JobApiController接收时decode一下
data = URLDecoder.decode(data, Charset.forName("UTF-8"));
这样是可以注册的
--- end body ---
