bug 703 - 708

This commit is contained in:
Ranyunqiao
2026-06-10 14:39:14 +08:00
parent e9d09e69c9
commit bbf4c8441b
9 changed files with 186 additions and 62 deletions

View File

@@ -42,8 +42,10 @@ public class ApplicationConfig {
@Bean
public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setTimeZone(TimeZone.getDefault());
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
mapper.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
mapper.setDateFormat(sdf);
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
JavaTimeModule javaTimeModule = new JavaTimeModule();