摘要: 简易缓存,可以设置时间的缓存 private static Cache<String,String> tokenCache = CacheBuilder.newBuilder().expireAfterWrite(29, TimeUnit.DAYS).build(); private static 阅读全文
posted @ 2019-01-08 14:01 __Ant 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 一,注意path地址是http请求访问到的地址,而不是文件路径 //后台代码 response.setHeader("Content-Disposition", "attachment;filename="+filename); URL url = new URL(path); // path是指欲 阅读全文
posted @ 2019-01-08 10:39 __Ant 阅读(812) 评论(0) 推荐(0) 编辑