摘要:
/** * 获取本机ip地址 */ public class IpUtil { public static String getIpAddress() { try { return InetAddress.getLocalHost().getHostAddress(); } catch (Unkno 阅读全文
posted @ 2021-01-26 16:20
快乐的张小凡
阅读(234)
评论(0)
推荐(0)
摘要:
public class DateUtil { public static String dateFromString(Date date){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return 阅读全文
posted @ 2021-01-26 16:18
快乐的张小凡
阅读(53)
评论(0)
推荐(0)
摘要:
public class SortUtil { /** * 对集合中是对象的排序 * * @param list * @param param 需要排序的参数名 * @param sort 排序字段 desc代表倒序 * @return */ public static List<?> listSo 阅读全文
posted @ 2021-01-26 16:14
快乐的张小凡
阅读(506)
评论(0)
推荐(0)
摘要:
public class UUIDUtils { /** * 获得一个随机UUID * @return String UUID */ public static String getUUID() { return UUID.randomUUID().toString().replace("-", " 阅读全文
posted @ 2021-01-26 16:10
快乐的张小凡
阅读(256)
评论(0)
推荐(0)
摘要:
public class GsonUtil { private static Gson gson = null; static { if (gson == null) { gson = new Gson(); } } private GsonUtil() { } /** * 对象转字符串 * @pa 阅读全文
posted @ 2021-01-26 16:05
快乐的张小凡
阅读(528)
评论(0)
推荐(0)