I'm migrating my application (Jee7) from Wildfly 9.0.1 to Wildfly 16.0.0.
I noticed different Responses from JAX-RS json (java.util.Date) deserialization on both wildfly version.
Is it a bug or Jee spec changed?
Is there a way to globally fix it for entire application?
Example classes:
@ApplicationPath("/rest")
public class RestConfig extends Application {
}
@Path("/test")
public class TestResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
public TestEntity get() {
return new TestEntity(new Date());
}
}
public class TestEntity {
private Date dtTest;
/* other fields */
public TestEntity(Date dtTest) {
super();
this.dtTest = dtTest;
}
public Date getDtTest() {
return dtTest;
}
}
Wildfly 9.0.1 Response: {"dtTest":1558550586974}
Wildfly 16.0.0 Response: {"dtTest":"2019-05-22T18:44:47.268Z[UTC]"}
I'd like to get 1558550586974 for "dtTest" as response from Wildfly 16.