public static String getPicture(HttpServletRequest request, String urlHttp){
String serverPicUrl = saveFilePath+ StringUtil.qiNiuUrl(6)+".png";
try {
URL url = new URL(urlHttp);
BufferedImage img = ImageIO.read(url);
File imageFile = new File(serverPicUrl);
File fileParent = imageFile.getParentFile();
if(!fileParent.exists()){
boolean mkdirs = fileParent.mkdirs();
if(!mkdirs){
return "";
}
}
ImageIO.write(img, "png", new File(serverPicUrl));
} catch (Exception e) {
e.printStackTrace();
}
return serverPicUrl;
}