You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
737 B
20 lines
737 B
package com.cm.demanderetraiteanticipe.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);
|
|
}
|
|
}
|