mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
17 lines
401 B
Java
17 lines
401 B
Java
package im.zhaojun.common.util;
|
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
/**
|
|
* @author zhaojun
|
|
*/
|
|
public class HttpUtil {
|
|
|
|
public static String getTextContent(String url) {
|
|
RestTemplate restTemplate = SpringContextHolder.getBean(RestTemplate.class);
|
|
String result = restTemplate.getForObject(url, String.class);
|
|
return result == null ? "" : result;
|
|
}
|
|
|
|
}
|