Example usage for org.springframework.web.bind.support ConfigurableWebBindingInitializer getConversionService

List of usage examples for org.springframework.web.bind.support ConfigurableWebBindingInitializer getConversionService

Introduction

In this page you can find the example usage for org.springframework.web.bind.support ConfigurableWebBindingInitializer getConversionService.

Prototype

@Nullable
public final ConversionService getConversionService() 

Source Link

Document

Return the ConversionService which will apply to every DataBinder.

Usage

From source file:org.zhangmz.cymbidium.authority.conf.WebMvcConfig.java

/**
  * //ww w .  j  a va  2s .c  o m
  */
@PostConstruct
public void initEditableValidation() {
    ConfigurableWebBindingInitializer initializer = (ConfigurableWebBindingInitializer) handlerAdapter
            .getWebBindingInitializer();
    if (initializer.getConversionService() != null) {
        GenericConversionService genericConversionService = (GenericConversionService) initializer
                .getConversionService();
        genericConversionService.addConverter(new StringToDateConverter());
    }

}