public class CustomConverterExample { public static void main(String[] args) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext( Config.class);
@Configuration public class Config { @Bean public ConversionService conversionService() { DefaultConversionService service = new DefaultConversionService(); service.addConverter(new StringToLocalDateConverter()); return service; }
@Bean public ClientBean clientBean() { return new ClientBean("2010/10/05"); } }