Segue as imagens e o código:
Json:
Database:
Cod:
@Table(name = "TB_Account")
@Entity
public class Account implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String email;
private String password;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", timezone = "UTC")
private Instant created;
@OneToOne(cascade = CascadeType.ALL)
@JsonManagedReference
private User user;
public Account() { }
public Account(String email, String password) {
this.email = email;
this.password = password;
this.created = Instant.now();
}
Por que está dando null se o instant está sendo inicializado no construtor.