🐛 修复获取文本内容时的 BUG

This commit is contained in:
zhaojun1998
2019-12-28 23:20:15 +08:00
parent 040e92a433
commit 04a2ff9542

View File

@@ -1,6 +1,5 @@
package im.zhaojun.common.util;
import cn.hutool.core.util.URLUtil;
import org.springframework.web.client.RestTemplate;
/**
@@ -10,7 +9,7 @@ public class HttpUtil {
public static String getTextContent(String url) {
RestTemplate restTemplate = SpringContextHolder.getBean(RestTemplate.class);
String result = restTemplate.getForObject(URLUtil.decode(url), String.class);
String result = restTemplate.getForObject(url, String.class);
return result == null ? "" : result;
}