|
|
@@ -11,6 +11,7 @@ import org.springframework.http.MediaType;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
+import org.springframework.util.StreamUtils;
|
|
|
import com.etotem.cfc.service.api.WechatServiceInterface;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
@@ -344,7 +345,7 @@ public class WechatService implements WechatServiceInterface {
|
|
|
os.close();
|
|
|
|
|
|
InputStream is = conn.getInputStream();
|
|
|
- byte[] responseBytes = is.readAllBytes();
|
|
|
+ byte[] responseBytes = StreamUtils.copyToByteArray(is);
|
|
|
is.close();
|
|
|
String responseBody = new String(responseBytes, StandardCharsets.UTF_8);
|
|
|
|