Browse Source

修改:将WebMvcConfig.java中的日期时间格式改为yyyy-mm-dd HH:mm:ss

dev_shibei_match
wxz 4 years ago
parent
commit
6e5eeb123a
  1. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/config/WebMvcConfig.java

@ -66,7 +66,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
//日期格式转换 //日期格式转换
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.setDateFormat(new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN_END_WITH_MINUTE)); mapper.setDateFormat(new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN));
mapper.setTimeZone(TimeZone.getTimeZone("GMT+8")); mapper.setTimeZone(TimeZone.getTimeZone("GMT+8"));
//Long类型转String类型 //Long类型转String类型

Loading…
Cancel
Save