import org.springframework.format.annotation.DateTimeFormat;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date highSchoolDate;
之前一直用阿里的那个,今天不好使,是和springboot有关么,不晓得。
本文探讨了在SpringBoot项目中使用@DateTimeFormat注解进行日期格式化的问题,特别是当遇到阿里工具类不适用的情况时,如何正确配置以确保日期时间能够被正确解析。
import org.springframework.format.annotation.DateTimeFormat;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date highSchoolDate;
之前一直用阿里的那个,今天不好使,是和springboot有关么,不晓得。
9万+
3500
8568
737
2635
7365
1357
8037

被折叠的 条评论
为什么被折叠?