Hello, I have a webservice that needs to fetch some data in the database and return a json object and I'm having problems with the date.
here is the object
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@XmlRootElement
public class Carro{
@XmlElement
private String id;
@XmlElement
private String nome;
@XmlElement
private Timestamp dtFabricacao;
... gets and setters
}
I go to the database and fill in the properties of the class normally the date gets "dd / mm / yyyy HH: mm: ss z"
but json stays with it
{
"id": 1
"nome": "Fiesta"
"dtFabricacao": 152679516567919
}
I've tried to create a serialization class and anotations and nothing works anymore I do not know what to do anymore.
I'm using jax and jackson to convert the object to json and my project uses maven