1、在你的项目中引入hutool的工具包
2、获取当前时间的小时数:DateUtil.thisHour(true);
3、获取当前时间的分钟数:DateUtil.thisMinute();
4、获取当前时间的秒数:DateUtil.thisSecond();
5、获取当前时间的毫秒:DateUtil.thisSecond();
时间:2024-10-14 23:51:54
1、在你的项目中引入hutool的工具包
2、获取当前时间的小时数:DateUtil.thisHour(true);
3、获取当前时间的分钟数:DateUtil.thisMinute();
4、获取当前时间的秒数:DateUtil.thisSecond();
5、获取当前时间的毫秒:DateUtil.thisSecond();