Skip to content

Commit 8acb82c

Browse files
committed
fix: Fixed JsonMapper config
1 parent 7512a9d commit 8acb82c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/java/it/gov/pagopa/template/config/json/JsonConfig.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ private static SimpleModule configureDateTimeModule() {
5454
}
5555

5656
@Bean
57-
public JsonMapper objectMapperJackson3() {
57+
public JsonMapper.Builder objectMapperJackson3Builder() {
5858
return JsonMapper.builder()
5959
.addModule(configureJackson3DateTimeModule())
6060
.configure(tools.jackson.databind.SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
6161
.configure(tools.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
6262
.changeDefaultPropertyInclusion(incl -> incl.withValueInclusion(JsonInclude.Include.NON_NULL))
63-
.defaultTimeZone(Constants.DEFAULT_TIMEZONE)
64-
.build();
63+
.defaultTimeZone(Constants.DEFAULT_TIMEZONE);
64+
}
65+
66+
@Bean
67+
public JsonMapper objectMapperJackson3() {
68+
return objectMapperJackson3Builder().build();
6569
}
6670

6771
/**

0 commit comments

Comments
 (0)