没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
//ͼƬÏÂÔØ
@RequestMapping(value = "/merchant/activity/download.json")
public String download(HttpServletResponse response,
HttpServletRequest request) throws Exception {
String url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1535512873&di=4b2073fa8a223bf04add8fbdba5c1291&imgtype=jpg&er=1&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F0117e2571b8b246ac72538120dd8a4.jpg%401280w_1l_2o_100sh.jpg";
download(url, "²âÊÔÄÚÈÝ", response);
return null;
}
@Override
public void download(String imagePath, String imageName,HttpServletResponse response) throws Exception {
/*List<String> suffixList = Arrays.asList(Constants.FILETYPE_DOWNLOAD_IMG);*/
String svgsuffix = ".png";
if(imagePath!=""&&!imagePath.equals(null)){
BufferedInputStream in = null;
BufferedOutputStream out = null;
try {
URL url = new URL(imagePath);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(5 * 1000);
conn.setRequestMethod("GET");
conn.setRequestProperty(
"Accept", "image/gif, image/jpeg, image/pjpeg, image/pjpeg, "
+ "application/x-shockwave-flash, application/xaml+xml, "
+ "application/vnd.ms-xpsdocument, application/x-ms-xbap, "
+ "application/x-ms-application, application/vnd.ms-excel, "
+ "application/vnd.ms-powerpoint, application/msword, */*");
conn.setRequestProperty("Accept-Language", "zh-CN");
@RequestMapping(value = "/merchant/activity/download.json")
public String download(HttpServletResponse response,
HttpServletRequest request) throws Exception {
String url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1535512873&di=4b2073fa8a223bf04add8fbdba5c1291&imgtype=jpg&er=1&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F0117e2571b8b246ac72538120dd8a4.jpg%401280w_1l_2o_100sh.jpg";
download(url, "²âÊÔÄÚÈÝ", response);
return null;
}
@Override
public void download(String imagePath, String imageName,HttpServletResponse response) throws Exception {
/*List<String> suffixList = Arrays.asList(Constants.FILETYPE_DOWNLOAD_IMG);*/
String svgsuffix = ".png";
if(imagePath!=""&&!imagePath.equals(null)){
BufferedInputStream in = null;
BufferedOutputStream out = null;
try {
URL url = new URL(imagePath);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(5 * 1000);
conn.setRequestMethod("GET");
conn.setRequestProperty(
"Accept", "image/gif, image/jpeg, image/pjpeg, image/pjpeg, "
+ "application/x-shockwave-flash, application/xaml+xml, "
+ "application/vnd.ms-xpsdocument, application/x-ms-xbap, "
+ "application/x-ms-application, application/vnd.ms-excel, "
+ "application/vnd.ms-powerpoint, application/msword, */*");
conn.setRequestProperty("Accept-Language", "zh-CN");
资源评论
qq_33412789
- 粉丝: 1
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功