Java Code Examples for org.springframework.cloud.openfeign.support.SpringMvcContract

The following examples show how to use org.springframework.cloud.openfeign.support.SpringMvcContract. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public OpenFeignSpringMvcContract(List<AnnotatedParameterProcessor> annotatedParameterProcessors,
    ConversionService conversionService) {
    Assert.notNull(annotatedParameterProcessors, "Parameter processors can not be null.");
    Assert.notNull(conversionService, "ConversionService can not be null.");

    List<AnnotatedParameterProcessor> processors;
    if (!annotatedParameterProcessors.isEmpty()) {
        processors = new ArrayList<>(annotatedParameterProcessors);
    } else {
        processors = getDefaultAnnotatedArgumentsProcessors();
    }
    this.annotatedArgumentProcessors = toAnnotatedArgumentProcessorMap(processors);
    this.conversionService = conversionService;
    this.expander = new SpringMvcContract.ConvertingExpander(conversionService);
}
 
Example 2
Source Project: istio-fleetman   Source File: FeignDateConfiguration.java    License: MIT License 4 votes vote down vote up
@Bean
public Contract feignContract() {
    return new SpringMvcContract();
}
 
Example 3
@Bean
@ConditionalOnMissingBean
public Contract feignContract(ConversionService feignConversionService) {
	return new SpringMvcContract(this.parameterProcessors, feignConversionService);
}
 
Example 4
@Test
public void contractDefaultCorrect() {
	SpringMvcContract.class.cast(this.context.getBeansOfType(Contract.class).get(0));
}
 
Example 5
@Bean
Contract feignContract() {
	return new SpringMvcContract();
}
 
Example 6
@Test
public void overrideContract() {
	Contract.Default.class.cast(this.context.getInstance("foo", Contract.class));
	SpringMvcContract.class.cast(this.context.getInstance("bar", Contract.class));
}
 
Example 7
@Before
public void init() {
	environment = new MockEnvironment();
	resolver = new DubboTransportedMethodMetadataResolver(environment,
			new SpringMvcContract());
}
 
Example 8
@org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean(feign.Contract.class)
@org.springframework.context.annotation.Bean
public feign.Contract feignContract() {
	return new SpringMvcContract();
}