上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 70 下一页
摘要: tomcat启动报错后显示以下错误 ## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocation (malloc) failed to allocate 阅读全文
posted @ 2020-06-30 18:13 yvioo 阅读(3150) 评论(0) 推荐(0)
摘要: 在java项目中,我们会遇到价格、金额的数据,这时候我们java中应该用BigDecimal类型,数据库用decimal类型, 长度可以自定义, 如18; 小数点我们项目中用的是2, 保留2位小数. 此外还要注意的就是默认值, 一定写成0.00, 不要用默认的NULL, 否则在进行加减排序等操作时, 阅读全文
posted @ 2020-06-30 10:06 yvioo 阅读(2015) 评论(0) 推荐(0)
摘要: /** * 获取当前日期的下周一到下周日的所有日期集合 * @return */ public static List getNextWeekDateList(){ Calendar cal1 = Calendar.getInstance(); Calendar cal2 =Calendar.get 阅读全文
posted @ 2020-06-28 17:12 yvioo 阅读(2727) 评论(0) 推荐(0)
摘要: 注: SimpleDateFormat是线程不安全的 public static SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); public static SimpleDateFormat format1 = new Simp 阅读全文
posted @ 2020-06-28 16:11 yvioo 阅读(10663) 评论(2) 推荐(0)
摘要: /** * 获取当前日期所在的周一到周日的所有日期集合 * @return */ public static List<Date> getWeekDateList() { Calendar cal = Calendar.getInstance(); // 设置一个星期的第一天,按中国的习惯一个星期的 阅读全文
posted @ 2020-06-28 15:21 yvioo 阅读(2826) 评论(0) 推荐(0)
摘要: /** * 获取当前时间所在周的周一和周日的日期时间 * @return */ public static Map<String,String> getWeekDate() { Map<String,String> map = new HashMap(); SimpleDateFormat sdf 阅读全文
posted @ 2020-06-28 15:15 yvioo 阅读(17631) 评论(0) 推荐(1)
摘要: /** * 获取当前周的周一的日期 * @param date 传入当前日期 * @return */ public static Date getThisWeekMonday(Date date) { Calendar cal = Calendar.getInstance(); cal.setTi 阅读全文
posted @ 2020-06-28 14:43 yvioo 阅读(7405) 评论(0) 推荐(0)
摘要: 使用了Lombok插件 Result.java package com.utils; import com.jetsum.business.common.constant.Constant; import lombok.Data; import org.apache.commons.lang3.St 阅读全文
posted @ 2020-06-24 14:47 yvioo 阅读(1121) 评论(0) 推荐(0)
摘要: 支付宝支付,单位为元,精确到小数点后两位,取值范围[0.01,100000000]。 /** * 此方法价格小数点小于两位会自动补全,多余两位会四舍五入保留两位小数点 * @param price 价格 * @return */ public static String getAliPayPrice 阅读全文
posted @ 2020-06-24 10:00 yvioo 阅读(1043) 评论(0) 推荐(0)
摘要: /** * 获取明天的日期字符串 * @return */ public static String tomorrowDateStr(){ Date date=new Date();//取时间 Calendar calendar = Calendar.getInstance(); calendar. 阅读全文
posted @ 2020-06-23 16:12 yvioo 阅读(12320) 评论(2) 推荐(0)
上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 70 下一页