We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58c52b8 commit 04a1361Copy full SHA for 04a1361
src/main/java/hexlet/code/config/JacksonConfig.java
@@ -11,13 +11,17 @@
11
12
@Configuration
13
public class JacksonConfig {
14
+
15
@Bean
16
Jackson2ObjectMapperBuilder objectMapperBuilder() {
17
var builder = new Jackson2ObjectMapperBuilder();
18
19
builder.serializationInclusion(JsonInclude.Include.NON_NULL)
20
.modulesToInstall(new JsonNullableModule());
21
22
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
23
builder.serializers(new LocalDateSerializer(formatter));
24
25
return builder;
26
}
27
0 commit comments