摘要:
/** * 获取本机ip地址 */ public class IpUtil { public static String getIpAddress() { try { return InetAddress.getLocalHost().getHostAddress(); } catch (Unkno 阅读全文
摘要:
public class DateUtil { public static String dateFromString(Date date){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); return 阅读全文
摘要:
public class SortUtil { /** * 对集合中是对象的排序 * * @param list * @param param 需要排序的参数名 * @param sort 排序字段 desc代表倒序 * @return */ public static List<?> listSo 阅读全文
摘要:
public class UUIDUtils { /** * 获得一个随机UUID * @return String UUID */ public static String getUUID() { return UUID.randomUUID().toString().replace("-", " 阅读全文
摘要:
public class GsonUtil { private static Gson gson = null; static { if (gson == null) { gson = new Gson(); } } private GsonUtil() { } /** * 对象转字符串 * @pa 阅读全文