-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from hocgin/develop
[新增功能](develop): 用户配置
- Loading branch information
Showing
2 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
package in.hocg.boot.web.autoconfiguration.jackson; | ||
|
||
import in.hocg.boot.web.autoconfiguration.jackson.localdatetime.LocalDateTimeDeserializer; | ||
import in.hocg.boot.web.autoconfiguration.jackson.xlong.LongDeserializer; | ||
import in.hocg.boot.web.autoconfiguration.jackson.xlong.LongSerializer; | ||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
/** | ||
* Created by hocgin on 2020/9/4 | ||
* email: [email protected] | ||
|
@@ -19,7 +22,7 @@ public class SerializerConfiguration { | |
public Jackson2ObjectMapperBuilderCustomizer jacksonCustomizer() { | ||
return builder -> { | ||
// builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer()); | ||
// builder.deserializerByType(LocalDateTime.class, new LocalDateTimeDeserializer()); | ||
builder.deserializerByType(LocalDateTime.class, new LocalDateTimeDeserializer()); | ||
builder.serializerByType(Long.class, new LongSerializer()); | ||
builder.deserializerByType(Long.class, new LongDeserializer()); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters