|
@@ -13,7 +13,7 @@ import java.util.*;
|
13
|
13
|
@Component
|
14
|
14
|
public class HttpUtils {
|
15
|
15
|
public String get(String url) throws Exception {
|
16
|
|
- log.info("请求地址: ", url);
|
|
16
|
+ log.info("请求地址: {}", url);
|
17
|
17
|
RestTemplate restTemplate = new RestTemplate();
|
18
|
18
|
HttpHeaders headers = new HttpHeaders();
|
19
|
19
|
headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
|
|
@@ -25,7 +25,7 @@ public class HttpUtils {
|
25
|
25
|
|
26
|
26
|
ResponseEntity<String> resp = restTemplate.exchange(formatURL, HttpMethod.GET, entity, String.class, params);
|
27
|
27
|
String res = resp.getBody();
|
28
|
|
- log.info("请求结果: ", res);
|
|
28
|
+ log.info("请求结果: {}", res);
|
29
|
29
|
return res;
|
30
|
30
|
}
|
31
|
31
|
|