コード例 #1
0
ファイル: RootConfig.java プロジェクト: jpukg/wstream
 @Bean
 public FormattingConversionService conversionService() {
   DefaultFormattingConversionService conversionService =
       new DefaultFormattingConversionService(false);
   conversionService.addFormatterForFieldAnnotation(new NumberFormatAnnotationFormatterFactory());
   DateFormatterRegistrar registrar = new DateFormatterRegistrar();
   DateFormatter dateFormatter = new DateFormatter();
   dateFormatter.setIso(ISO.DATE);
   registrar.setFormatter(dateFormatter);
   registrar.registerFormatters(conversionService);
   return conversionService;
 }