Code example for ConfigurableWebBindingInitializer

Methods: setConversionServicesetValidator

1
		AnnotationMethodHandlerAdapter adapter = new AnnotationMethodHandlerAdapter(); 
 
		ActionInterceptor[] interceptors = new ActionInterceptor[]{datastoreInterceptor}; 
		//adapter.setActionInterceptors(interceptors); 
 
		ConfigurableWebBindingInitializer wbi = new ConfigurableWebBindingInitializer(); 
		wbi.setValidator(getValidator()); 
		wbi.setConversionService(conversionService()); 
 
		adapter.setWebBindingInitializer(wbi); 
		adapter.setMessageConverters(getMessageConverters()); 
		adapter.setOrder(-1); 
		return adapter; 
	} 
 
	@Bean 
	public ConversionService conversionService() { 
		FormattingConversionServiceFactoryBean fb = new FormattingConversionServiceFactoryBean(); 
		fb.afterPropertiesSet(); 
		FormattingConversionService cs = fb.getObject();