Guest User

Untitled

a guest
Oct 23rd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. @JsonDeserialize(using = LocalDateDeserializer.class)
  2. @JsonSerialize(using = LocalDateSerializer.class)
  3. private LocalDate birthday;
  4.  
  5. @JsonFormat(pattern = "dd/MM/yyyy")
  6. @JsonDeserialize(using = LocalDateDeserializer.class)
  7. @JsonSerialize(using = LocalDateSerializer.class)
  8. private LocalDate birthdate;*
  9.  
  10. <!-- This is enough for LocalDate to be deserialized using ISO format -->
  11. <dependency>
  12. <groupId>com.fasterxml.jackson.datatype</groupId>
  13. <artifactId>jackson-datatype-jsr310</artifactId>
  14. </dependency>
Add Comment
Please, Sign In to add comment