package cn.itcast.springboot.javaconfig.test;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.FileUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpStatus;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
public class DownloadImage {
public static void main(String[] args) {
CloseableHttpClient client = null;
try {
client = HttpClients.createDefault();
String url = "https://picsum.photos/300/150/?image=";
String path = "f:/11/img";
for (int i =