保誠-保戶業務員媒合平台
jack
2023-09-01 22cfc1cc720feabe5bb2c2ef9aa827094ab39e2b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.pollex.pam.config;
 
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
/**
 * Configure the converters to use the ISO format for dates by default.
 */
@Configuration
public class DateTimeFormatConfiguration implements WebMvcConfigurer {
 
    @Override
    public void addFormatters(FormatterRegistry registry) {
        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
        registrar.setUseIsoFormat(true);
        registrar.registerFormatters(registry);
    }
}