src/main/java/uk/gov/hmcts/reform/sendletter/config/TimeConfiguration.java
@Bean
    public Jackson2ObjectMapperBuilderCustomizer jsonCustomiser() {
        return builder -> {
            builder.simpleDateFormat(DATE_TIME_PATTERN);

            builder.serializers(
                new LocalDateSerializer(DateTimeFormatter.ISO_LOCAL_DATE),
                new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN)),
                new ZonedDateTimeSerializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN))
            );
        };
    }
// global setting via config files not working with java8
global setting via config files not working with java8
global setting via config files not working with java8
@Bean
    public Jackson2ObjectMapperBuilderCustomizer jsonCustomiser() {
        return builder -> {
            builder.simpleDateFormat(DATE_TIME_PATTERN);
            builder.serializers(
                new LocalDateSerializer(DateTimeFormatter.ISO_LOCAL_DATE),
                new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN)),
                new ZonedDateTimeSerializer(DateTimeFormatter.ofPattern(DATE_TIME_PATTERN))
            );
        };
    }
@ Bean public Jackson2ObjectMapperBuilderCustomizer jsonCustomiser ( ) { return builder -> { builder . simpleDateFormat ( DATE_TIME_PATTERN ) ; builder . serializers ( new LocalDateSerializer ( DateTimeFormatter . ISO_LOCAL_DATE ) , new LocalDateTimeSerializer ( DateTimeFormatter . ofPattern ( DATE_TIME_PATTERN ) ) , new ZonedDateTimeSerializer ( DateTimeFormatter . ofPattern ( DATE_TIME_PATTERN ) ) ) ; } ; }
global setting via config files not working with java8
global setting via config files not working with java8