develop #112

Merged
judaur2005 merged 2 commits from develop into main 2026-02-18 20:43:23 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 74a00a3856 - Show all commits

View File

@@ -164,6 +164,10 @@
<groupId>com.fasterxml.jackson.datatype</groupId> <groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId> <artifactId>jackson-datatype-jsr310</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>

View File

@@ -2,6 +2,7 @@ package io.gmss.fiscad.configuration;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@@ -16,6 +17,7 @@ public class RestTemplateConfig {
public ObjectMapper objectMapper() { public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JavaTimeModule()); mapper.registerModule(new JavaTimeModule());
mapper.registerModule(new Jdk8Module());
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
return mapper; return mapper;
} }
@@ -23,7 +25,7 @@ public class RestTemplateConfig {
@Bean @Bean
public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() { public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() {
return builder -> { return builder -> {
builder.modules(new JavaTimeModule()); builder.modules(new JavaTimeModule(), new Jdk8Module());
builder.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); builder.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
}; };
} }