Created
February 22, 2019 03:28
-
-
Save luizrobertofreitas/f99c9589dc038868e756b70f790dd2c4 to your computer and use it in GitHub Desktop.
Wierd LocalDateTime when using spring-boot < 2.0.0
This file contains hidden or 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
1. On pom.xml | |
<dependency> | |
<groupId>com.fasterxml.jackson.datatype</groupId> | |
<artifactId>jackson-datatype-jsr310</artifactId> | |
<version>2.9.8</version> | |
</dependency> | |
2. On application.properties | |
spring.jackson.serialization.write_dates_as_timestamps=false | |
3. On LocalDateTime field: | |
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") | |
private LocalDateTime dateIntegration; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment