您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

21 行
720B

  1. package vn.azteam.tpf.config;
  2. import org.springframework.context.annotation.Configuration;
  3. import org.springframework.format.FormatterRegistry;
  4. import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
  5. import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
  6. /**
  7. * Configure the converters to use the ISO format for dates by default.
  8. */
  9. @Configuration
  10. public class DateTimeFormatConfiguration implements WebMvcConfigurer {
  11. @Override
  12. public void addFormatters(FormatterRegistry registry) {
  13. DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
  14. registrar.setUseIsoFormat(true);
  15. registrar.registerFormatters(registry);
  16. }
  17. }