随笔分类 -  JAVA / 工具类搜集

摘要:private String dateToRelativeTime(Date date) { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date now = new Date(); long between 阅读全文
posted @ 2024-05-31 13:35 liftsail 编辑
摘要:demo01 import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException; public class Test { private final static int BU 阅读全文
posted @ 2022-11-18 17:56 liftsail 编辑
摘要:/** * 毫秒转换为时间字符串 * @param milliseconds * @return */ public static String timeStampToDhms(long milliseconds) { long day = TimeUnit.MILLISECONDS.toDays( 阅读全文
posted @ 2022-10-11 17:36 liftsail 编辑
摘要:1.maven依赖 <dependency> <groupId>cn.jpush.api</groupId> <artifactId>jpush-client</artifactId> <version>3.3.9</version></dependency> 2.工具类 /** * 极光推送工具类 阅读全文
posted @ 2022-09-03 10:58 liftsail 编辑
摘要:1.工具类 import com.aliyun.dysmsapi20170525.Client;import com.aliyun.dysmsapi20170525.models.*;import com.aliyun.teaopenapi.models.Config;import com.aliy 阅读全文
posted @ 2022-08-05 13:31 liftsail 编辑
摘要:一:Git是什么? Git是目前世界上最先进的分布式版本控制系统。 工作原理 / 流程: Workspace:工作区Index / Stage:暂存区Repository:仓库区(或本地仓库)Remote:远程仓库 二:SVN与Git的最主要的区别? SVN是集中式版本控制系统,版本库是集中放在中央 阅读全文
posted @ 2022-08-03 17:19 liftsail 编辑
摘要:首先引入依赖包,这里使用的是alibaba的fastjson; <!-- fastjson依赖 --> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.76</ver 阅读全文
posted @ 2022-07-16 15:20 liftsail 编辑
摘要:工具类 package com.education.utils;import java.io.Serializable;import java.util.List;import java.util.stream.Collectors;/** * <b> 分页通用类 </b> * * @param < 阅读全文
posted @ 2022-07-01 17:42 liftsail 编辑
摘要:配置属性 //设置好账号的ACCESS_KEY和SECRET_KEYstatic final String ACCESS_KEY = "";static final String SECRET_KEY = "";//要上传的空间static final String BUCKET_NAME = "" 阅读全文
posted @ 2022-06-21 16:31 liftsail 编辑
摘要:结论:isNotEmpty(str)等价于 str != null && str.length > 0isNotBlank(str) 等价于 str != null && str.length > 0 && str.trim().length > 0isEmpty 等价于 str == null | 阅读全文
posted @ 2022-05-18 11:47 liftsail 编辑

点击右上角即可分享
微信分享提示