Compare commits

...

3 Commits

Author SHA1 Message Date
Marcin Grzejszczak 6c9bdc5db7 updated feign to 12.0-SNAPSHOT 2 years ago
Marcin Grzejszczak 71c65fad4a FeignBuilderCustomizer instead of capabilities 2 years ago
Marcin Grzejszczak d8c9f2b354 Sets up MicrometerCapabilities 2 years ago
  1. 11
      spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignClientsConfiguration.java
  2. 2
      spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/annotation/QueryMapParameterProcessor.java
  3. 2
      spring-cloud-openfeign-dependencies/pom.xml

11
spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignClientsConfiguration.java

@ -28,9 +28,12 @@ import feign.codec.Decoder; @@ -28,9 +28,12 @@ import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.form.MultipartFormContentProcessor;
import feign.form.spring.SpringFormEncoder;
import feign.micrometer.FeignObservationConvention;
import feign.micrometer.MicrometerCapability;
import feign.micrometer.ObservedClientInterceptor;
import feign.optionals.OptionalDecoder;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.observation.ObservationRegistry;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.ObjectProvider;
@ -247,6 +250,14 @@ public class FeignClientsConfiguration { @@ -247,6 +250,14 @@ public class FeignClientsConfiguration {
return new MicrometerCapability(meterRegistry);
}
@Bean
@ConditionalOnBean(ObservationRegistry.class)
public FeignBuilderCustomizer defaultClientInterceptorProvider(ObservationRegistry observationRegistry,
ObjectProvider<FeignObservationConvention> feignObservationConvention) {
return builder -> builder.clientInterceptor(
new ObservedClientInterceptor(observationRegistry, feignObservationConvention.getIfAvailable()));
}
}
}

2
spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/annotation/QueryMapParameterProcessor.java

@ -45,7 +45,7 @@ public class QueryMapParameterProcessor implements AnnotatedParameterProcessor { @@ -45,7 +45,7 @@ public class QueryMapParameterProcessor implements AnnotatedParameterProcessor {
MethodMetadata metadata = context.getMethodMetadata();
if (metadata.queryMapIndex() == null) {
metadata.queryMapIndex(paramIndex);
metadata.queryMapEncoded(SpringQueryMap.class.cast(annotation).encoded());
// metadata.queryMapEncoded(SpringQueryMap.class.cast(annotation).encoded());
}
return true;
}

2
spring-cloud-openfeign-dependencies/pom.xml

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
<name>spring-cloud-openfeign-dependencies</name>
<description>Spring Cloud OpenFeign Dependencies</description>
<properties>
<feign.version>11.8</feign.version>
<feign.version>12.0-SNAPSHOT</feign.version>
<feign-form.version>3.8.0</feign-form.version>
<!-- Deprecated - reached EOL -->
<spring-security-oauth2-autoconfigure.version>2.5.2</spring-security-oauth2-autoconfigure.version>

Loading…
Cancel
Save