添加远程调用日志
This commit is contained in:
parent
a7998050ae
commit
7bb0740694
|
@ -2,6 +2,8 @@ package com.gitlink.softbot.utils;
|
|||
|
||||
|
||||
import com.gitlink.softbot.global.vo.Response;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
@ -16,7 +18,7 @@ import java.util.Objects;
|
|||
|
||||
public class RestTemplateUtil {
|
||||
|
||||
//private static Logger logger = (Logger) LoggerFactory.getLogger(RestTemplateUtil.class);
|
||||
private static Logger logger = (Logger) LoggerFactory.getLogger(RestTemplateUtil.class);
|
||||
/**
|
||||
* @Description 私有构造函数
|
||||
*/
|
||||
|
@ -83,7 +85,7 @@ public class RestTemplateUtil {
|
|||
params.setAll(inputParams);
|
||||
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url);
|
||||
URI uri = builder.queryParams(params).build().encode().toUri();
|
||||
//System.out.println(uri);
|
||||
logger.info("远程接口调用地址: " + url);
|
||||
ResponseEntity<String> resp = customRestTemplate.exchange(uri, method, entity, String.class);
|
||||
return handleResult(resp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue