Commit ed47e58a356e275bb526d7efe80b84570d2c8192

Authored by badetitou
1 parent a0940d93

Better format Json DATE

src/main/java/etunicorn/entity/Personne.java
1 1 package etunicorn.entity;
2 2  
  3 +import com.fasterxml.jackson.annotation.JsonFormat;
  4 +
3 5 import javax.persistence.*;
4 6 import java.util.Date;
5 7  
... ... @@ -50,6 +52,7 @@ public class Personne {
50 52 this.carte = carte;
51 53 }
52 54  
  55 + @JsonFormat(pattern="YYYY-MM-DD hh:mm:ss")
53 56 public Date getNaissance() {
54 57 return naissance;
55 58 }
... ...
src/main/java/etunicorn/entity/Session.java
1 1 package etunicorn.entity;
2 2  
  3 +import com.fasterxml.jackson.annotation.JsonFormat;
  4 +
3 5 import javax.persistence.Entity;
4 6 import javax.persistence.Id;
5 7 import javax.persistence.ManyToOne;
... ... @@ -58,6 +60,7 @@ public class Session {
58 60 this.token = token;
59 61 }
60 62  
  63 + @JsonFormat(pattern="YYYY-MM-DD hh:mm:ss")
61 64 public Date getValidity() {
62 65 return validity;
63 66 }
... ...