Example usage for org.springframework.format.support FormattingConversionService FormattingConversionService

List of usage examples for org.springframework.format.support FormattingConversionService FormattingConversionService

Introduction

In this page you can find the example usage for org.springframework.format.support FormattingConversionService FormattingConversionService.

Prototype

FormattingConversionService

Source Link

Usage

From source file:com.crossover.trial.weather.endpoint.RestWeatherQueryEndpointTest.java

@Before
public void setup() {
    FormattingConversionService converter = new FormattingConversionService();
    converter.addConverter(new DataPointTypeConverter());
    converter.addConverter(new IATASpringConverter());
    mockMvc = MockMvcBuilders.standaloneSetup(queryEndpoint, collectorEndpoint).setConversionService(converter)
            .build();//w ww.  j ava  2  s. co m
}

From source file:com.crossover.trial.weather.endpoint.RestWeatherCollectorEndpointTest.java

@Before
public void setup() {
    FormattingConversionService converter = new FormattingConversionService();
    converter.addConverter(new DataPointTypeConverter());
    converter.addConverter(new IATASpringConverter());
    mockMvc = MockMvcBuilders.standaloneSetup(endpoint).setConversionService(converter).build();
}

From source file:org.consultjr.mvc.core.config.ApplicationConfig.java

@Bean
public FormattingConversionService mvcConversionService() {
    FormattingConversionService conversionService = new FormattingConversionService();
    addFormatters(conversionService);//from   ww w  .  ja v  a2s .  c  o  m
    return conversionService;
}

From source file:org.springframework.springfaces.mvc.bind.ReverseDataBinderTest.java

@Before
public void setup() {
    this.conversionService = new FormattingConversionService();
    this.conversionService.addConverter(new CustomTypeToStringConverter());
    this.conversionService.addConverter(new StringToCustomTypeConverter());
}