benashby
4/13/2015 - 5:10 PM

SpringBootConverterConfig.java

@Configuration
public class MvcConfig extends WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter {
  
   @Bean
    public FormattingConversionServiceFactoryBean formattingConversionServiceFactoryBean() {
        FormattingConversionServiceFactoryBean formattingConversionServiceFactoryBean
                = new FormattingConversionServiceFactoryBean();

        Set<org.springframework.core.convert.converter.Converter> converters = new HashSet<>();
        converters.add(someConverter);
       

        formattingConversionServiceFactoryBean.setConverters(converters);

        return formattingConversionServiceFactoryBean;
    }

}