Merge pull request #1345 from zhipingwu/bugfix-character-encoding20191208

修复bug: 执行器线程阻塞时给管理器返回的json中有特殊符号,导致管理器端一直报错, 使用getBytes utf-8即可。
master
许雪里 5 years ago committed by GitHub
commit 03099b8e0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java

@ -57,7 +57,7 @@ public class XxlJobRemotingUtil {
String requestBody = BasicJson.toJson(requestObj);
DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream());
dataOutputStream.writeBytes(requestBody);
dataOutputStream.write(requestBody.getBytes("UTF-8"));
dataOutputStream.flush();
dataOutputStream.close();

Loading…
Cancel
Save