💥 新增 MINIO 支持

This commit is contained in:
zhaojun1998
2019-12-07 19:51:09 +08:00
parent 22a5e5cfeb
commit 57f012482c
4 changed files with 121 additions and 2 deletions
@@ -1,12 +1,13 @@
package im.zhaojun.common.util;
import cn.hutool.core.util.URLUtil;
import org.springframework.web.client.RestTemplate;
public class HttpUtil {
public static String getTextContent(String url) {
RestTemplate restTemplate = SpringContextHolder.getBean(RestTemplate.class);
String result = restTemplate.getForObject(url, String.class);
String result = restTemplate.getForObject(URLUtil.decode(url), String.class);
return result == null ? "" : result;
}