java常用方法
开发中常用的方法,功能
BIG_PEI
码农,全栈
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
springBoot配置多数据源
springboot整合Apache Druid原创 2022-06-27 17:27:27 · 2644 阅读 · 0 评论 -
根据图片地址下载图片 获取长宽 大小
public File getFile(String url) throws Exception { //对本地文件命名 //http://oyxe80s4l.bkt.clouddn.com/image/activity/20201130/896d997f49c141fbab9147478db082f2.jpg // String fileName = url.substring(url.lastIndexOf("."),url.lastIndexOf("?")原创 2021-01-08 18:25:32 · 437 阅读 · 0 评论 -
比较两个时间的大小前后
话不多说 上代码 public boolean judgmentTime(Long time) { long current = System.currentTimeMillis(); long cha = current - time; if (cha < 0) { return false; } double result = cha * 1.0 / (1000 * 60 * 60);原创 2021-05-07 18:31:27 · 269 阅读 · 0 评论 -
根据url下载图片保存到本地 有问题请留言
url返回json数据结构 通过http请求获取路径信息并下载 public static void main(String[] args) { Map<String, Object> map = new HashMap<>(8); // for (int i = 41; i <= 80; i++) { map.put("index", 1); map.put("_ts_", System.c原创 2021-06-01 11:33:48 · 213 阅读 · 0 评论
分享