1.修改日志分页
This commit is contained in:
@@ -64,17 +64,19 @@ public class HttpClientUtil {
|
||||
//请求结果
|
||||
CloseableHttpResponse response = null;
|
||||
String content ="";
|
||||
// try {
|
||||
try {
|
||||
//执行get方法
|
||||
response = httpclient.execute(httpget);
|
||||
// if(response.getStatusLine().getStatusCode()==200){
|
||||
content = EntityUtils.toString(response.getEntity(),"utf-8");
|
||||
// }
|
||||
// } catch (ClientProtocolException e) {
|
||||
// e.printStackTrace();
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
if(response.getStatusLine().getStatusCode()==HttpStatus.SC_OK){
|
||||
content = EntityUtils.toString(response.getEntity(),"utf-8");
|
||||
logger.debug("获取消息成功,相应内容如下: " + content);
|
||||
}
|
||||
} catch (ClientProtocolException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
logger.info("dashboard请求路径:"+url);
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user