org.springframework.cloud.openfeign.support.SpringMvcContract Java Examples
The following examples show how to use
org.springframework.cloud.openfeign.support.SpringMvcContract.
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
Source File: OpenFeignSpringMvcContract.java From summerframework with Apache License 2.0 | 5 votes |
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 File: FeignDateConfiguration.java From istio-fleetman with MIT License | 4 votes |
@Bean public Contract feignContract() { return new SpringMvcContract(); }
Example #3
Source File: FeignClientsConfiguration.java From spring-cloud-openfeign with Apache License 2.0 | 4 votes |
@Bean @ConditionalOnMissingBean public Contract feignContract(ConversionService feignConversionService) { return new SpringMvcContract(this.parameterProcessors, feignConversionService); }
Example #4
Source File: EnableFeignClientsTests.java From spring-cloud-openfeign with Apache License 2.0 | 4 votes |
@Test public void contractDefaultCorrect() { SpringMvcContract.class.cast(this.context.getBeansOfType(Contract.class).get(0)); }
Example #5
Source File: FeignClientErrorDecoderTests.java From spring-cloud-openfeign with Apache License 2.0 | 4 votes |
@Bean Contract feignContract() { return new SpringMvcContract(); }
Example #6
Source File: FeignClientOverrideDefaultsTests.java From spring-cloud-openfeign with Apache License 2.0 | 4 votes |
@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
Source File: DubboTransportedMethodMetadataResolverTest.java From spring-cloud-alibaba with Apache License 2.0 | 4 votes |
@Before public void init() { environment = new MockEnvironment(); resolver = new DubboTransportedMethodMetadataResolver(environment, new SpringMvcContract()); }
Example #8
Source File: SpringCloudConfiguration.java From ByteJTA with GNU Lesser General Public License v3.0 | 4 votes |
@org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean(feign.Contract.class) @org.springframework.context.annotation.Bean public feign.Contract feignContract() { return new SpringMvcContract(); }