java110
2021-10-13 ba1c0ad6cffaa8a6288a4e66d0598d16f1cccc10
java110-core/src/main/java/com/java110/core/factory/ChinaUmsFactory.java
@@ -14,6 +14,9 @@
import org.apache.commons.codec.binary.Hex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
@@ -86,7 +89,13 @@
        RestTemplate outRestTemplate = ApplicationContextFactory.getBean("outRestTemplate", RestTemplate.class);
        logger.debug("获取access_token 入参:" + url + " 请求参数" + paramMap.toJSONString());
        ResponseEntity<String> response = outRestTemplate.postForEntity(url, paramMap.toJSONString(), String.class);
        //ResponseEntity<String> response = outRestTemplate.postForEntity(url, paramMap.toJSONString(), String.class);
        HttpHeaders headers = new HttpHeaders();
        headers.add("Content-Type", "application/json");
        HttpEntity httpEntity = new HttpEntity(paramMap.toJSONString(), headers);
        ResponseEntity<String> response = outRestTemplate.exchange(
                url, HttpMethod.POST, httpEntity, String.class);
        logger.debug("获取access_token 入参:" + url + " 返回参数" + response);