直接上解决办法
客户端的代码
String result = new String(HTTPUtil.HttpGet("http://localhost:8090/service/external/getDeptListByOrgId/" + orgId + "/" + model.getUuid()), "UTF-8");
之前没有加编码格式 加之后完美解决。
附上 HTTPGet的代码
public static byte[] HttpGet(String url) throws ServiceException {
try {
ByteArrayOutputStream swapStream = new ByteArrayOutputStream();
HttpClient httpClient = new HttpClient();
if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1) {
url = "http://" + url;
}
URI uri = new URI(url, false, "UTF-8");
// 设置连接超时
httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(5 * 1000);
// 设置读取超时
ht