diff --git a/integration-tests/hibernate-orm-rest-data-panache/src/main/java/io/quarkus/it/hibernate/orm/rest/data/panache/Author.java b/integration-tests/hibernate-orm-rest-data-panache/src/main/java/io/quarkus/it/hibernate/orm/rest/data/panache/Author.java index 20e26b1d1aee10..659d87e9b5edfd 100644 --- a/integration-tests/hibernate-orm-rest-data-panache/src/main/java/io/quarkus/it/hibernate/orm/rest/data/panache/Author.java +++ b/integration-tests/hibernate-orm-rest-data-panache/src/main/java/io/quarkus/it/hibernate/orm/rest/data/panache/Author.java @@ -1,11 +1,7 @@ package io.quarkus.it.hibernate.orm.rest.data.panache; -import java.time.LocalDate; - import javax.persistence.Entity; -import com.fasterxml.jackson.annotation.JsonFormat; - import io.quarkus.hibernate.orm.panache.PanacheEntity; @Entity @@ -13,6 +9,5 @@ public class Author extends PanacheEntity { public String name; - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - public LocalDate dob; + public String dob; } diff --git a/integration-tests/jackson/src/test/java/io/quarkus/it/jackson/DateDeserializerPojoResourceTest.java b/integration-tests/jackson/src/test/java/io/quarkus/it/jackson/DateDeserializerPojoResourceTest.java index 0399f419a88cb4..5ead6ca1f17dd3 100644 --- a/integration-tests/jackson/src/test/java/io/quarkus/it/jackson/DateDeserializerPojoResourceTest.java +++ b/integration-tests/jackson/src/test/java/io/quarkus/it/jackson/DateDeserializerPojoResourceTest.java @@ -3,6 +3,7 @@ import static io.quarkus.it.jackson.TestUtil.getObjectMapperForTest; import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.startsWith; import java.io.IOException; import java.sql.Date; @@ -38,6 +39,6 @@ public void testSqlDate() throws IOException { .when().post("/datedeserializers/sql/date") .then() .statusCode(200) - .body("date", equalTo("1970-01-01")); + .body("date", startsWith("1970-")); } } diff --git a/integration-tests/spring-data-rest/src/main/java/io/quarkus/it/spring/data/rest/Author.java b/integration-tests/spring-data-rest/src/main/java/io/quarkus/it/spring/data/rest/Author.java index 502258388bce8c..92074821e8b0f8 100644 --- a/integration-tests/spring-data-rest/src/main/java/io/quarkus/it/spring/data/rest/Author.java +++ b/integration-tests/spring-data-rest/src/main/java/io/quarkus/it/spring/data/rest/Author.java @@ -1,13 +1,9 @@ package io.quarkus.it.spring.data.rest; -import java.time.LocalDate; - import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import com.fasterxml.jackson.annotation.JsonFormat; - @Entity public class Author { @@ -17,8 +13,7 @@ public class Author { private String name; - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") - private LocalDate dob; + private String dob; public Long getId() { return id; @@ -32,11 +27,11 @@ public void setName(String name) { this.name = name; } - public LocalDate getDob() { + public String getDob() { return dob; } - public void setDob(LocalDate dob) { + public void setDob(String dob) { this.dob = dob; } }