@Configuration public class DateTimeFormatConfig extends Object
Constructor and Description |
---|
DateTimeFormatConfig() |
Modifier and Type | Method and Description |
---|---|
org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer |
jackson2ObjectMapperBuilderCustomizer()
关于日期时间反序列化,只有在使用
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字符串转为日期类型
|
@Bean public org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer()
RequestBody
时有效@Bean public org.springframework.core.convert.converter.Converter<String,LocalDateTime> localDateTimeConvert()
@Bean public org.springframework.core.convert.converter.Converter<String,LocalDate> localDateConvert()
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.