refactor: 封装公共配置,降低使用复杂度

This commit is contained in:
2023-11-25 20:45:16 +08:00
parent 4a8e4e4408
commit dafb2d8f5b
9 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
--- ### Spring 配置
spring:
## MVC 配置
mvc:
format:
# 日期格式化(针对 java.util.Date
date-time: yyyy-MM-dd HH:mm:ss
## Jackson 配置
jackson:
# 时区配置
time-zone: GMT+8
# 日期格式化(针对 java.util.Date
date-format: yyyy-MM-dd HH:mm:ss
# 序列化配置Bean -> JSON
serialization:
# 允许序列化无属性的 Bean
FAIL_ON_EMPTY_BEANS: false
# 反序列化配置JSON -> Bean
deserialization:
# 允许反序列化不存在的属性
FAIL_ON_UNKNOWN_PROPERTIES: false