Date date = DateRun.getFutureDate(7); String d = dateFormat.format(date); arrangeService.insertTwoWeekArrange(d); System.err.println("执行定时任务1: " + LocalDateTime.now()); } }
Date date = new Date(); try { date = sdf.parse(date_str); } catch (ParseException e) { System.err.println("日期格式错误:"+" "+ LocalDateTime.now()); e.printStackTrace(); }
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !