use of org.molgenis.data.convert.StringToDateConverter in project molgenis by molgenis.
the class MolgenisWebAppConfig method addFormatters.
@Override
public void addFormatters(FormatterRegistry registry) {
registry.addConverter(new StringToDateTimeConverter());
registry.addConverter(new StringToDateConverter());
}
use of org.molgenis.data.convert.StringToDateConverter in project molgenis by molgenis.
the class DataConverter method getConversionService.
private static ConversionService getConversionService() {
if (conversionService == null) {
if (ApplicationContextProvider.getApplicationContext() == null) {
// We are not in a Spring managed environment
conversionService = new DefaultConversionService();
((DefaultConversionService) conversionService).addConverter(new StringToDateConverter());
((DefaultConversionService) conversionService).addConverter(new StringToDateTimeConverter());
} else {
conversionService = ApplicationContextProvider.getApplicationContext().getBean(ConversionService.class);
}
}
return conversionService;
}
use of org.molgenis.data.convert.StringToDateConverter in project molgenis by molgenis.
the class PlatformITConfig method conversionService.
@Bean
public ConversionService conversionService() {
DefaultConversionService defaultConversionService = new DefaultConversionService();
defaultConversionService.addConverter(new StringToDateConverter());
defaultConversionService.addConverter(new StringToDateTimeConverter());
return defaultConversionService;
}
Aggregations