类 DateTimeFormatConfig
- java.lang.Object
-
- ai.yue.library.base.config.datetime.DateTimeFormatConfig
-
@Configuration public class DateTimeFormatConfig extends Object
日期时间格式化配置- 从以下版本开始:
- 2020年2月28日
- 作者:
- ylyue
-
-
构造器概要
构造器 构造器 说明 DateTimeFormatConfig()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizerjackson2ObjectMapperBuilderCustomizer()关于日期时间反序列化,只有在使用RequestBody时有效org.springframework.core.convert.converter.Converter<String,LocalDate>localDateConvert()日期参数接收转换器,将json字符串转为日期类型org.springframework.core.convert.converter.Converter<String,LocalDateTime>localDateTimeConvert()日期参数接收转换器,将json字符串转为日期类型org.springframework.core.convert.converter.Converter<String,LocalTime>localTimeConvert()日期参数接收转换器,将json字符串转为日期类型
-
-
-
方法详细资料
-
jackson2ObjectMapperBuilderCustomizer
@Bean public org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer()
关于日期时间反序列化,只有在使用RequestBody时有效- 返回:
- 自定义序列化器
-
localDateTimeConvert
@Bean public org.springframework.core.convert.converter.Converter<String,LocalDateTime> localDateTimeConvert()
日期参数接收转换器,将json字符串转为日期类型- 返回:
- MVC LocalDateTime 参数接收转换器
-
localDateConvert
@Bean public org.springframework.core.convert.converter.Converter<String,LocalDate> localDateConvert()
日期参数接收转换器,将json字符串转为日期类型- 返回:
- MVC LocalDate 参数接收转换器
-
-