From 3d826a2feb2a20fddcf9d85ee644e9b9a6eb9af5 Mon Sep 17 00:00:00 2001 From: Benedetta-fabbri Date: Thu, 16 Jan 2025 15:10:22 +0100 Subject: [PATCH] fix test --- .../pagopa/pu/organization/model/BaseEntity.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/main/java/it/gov/pagopa/pu/organization/model/BaseEntity.java b/src/main/java/it/gov/pagopa/pu/organization/model/BaseEntity.java index 588875f..270d17b 100644 --- a/src/main/java/it/gov/pagopa/pu/organization/model/BaseEntity.java +++ b/src/main/java/it/gov/pagopa/pu/organization/model/BaseEntity.java @@ -1,9 +1,6 @@ package it.gov.pagopa.pu.organization.model; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; -import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.persistence.Column; import jakarta.persistence.EntityListeners; import jakarta.persistence.MappedSuperclass; @@ -15,7 +12,6 @@ import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; -import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.time.LocalDateTime; @@ -29,16 +25,10 @@ public abstract class BaseEntity implements Serializable { @Column(updatable = false) @CreatedDate - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - @JsonSerialize(using = LocalDateTimeSerializer.class) - @JsonDeserialize(using = LocalDateTimeDeserializer.class) - //@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ") + @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") private LocalDateTime creationDate; @LastModifiedDate - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - @JsonSerialize(using = LocalDateTimeSerializer.class) - @JsonDeserialize(using = LocalDateTimeDeserializer.class) - //@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ") + @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") private LocalDateTime updateDate; @LastModifiedBy private String updateOperatorExternalId;