You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While creating `Feign` client beans, we resolve the values passed via the `@FeignClient` annotation. As of `4.x`, the values are being resolved eagerly. This is a good solution for most use-cases, and it also allows for AOT support.
85
+
86
+
If you need the attributes to be resolved lazily, set the `spring.cloud.openfeign.lazy-attributes-resolution` property value to `true`.
87
+
88
+
TIP: For Spring Cloud Contract test integration, lazy attribute resolution should be used.
89
+
81
90
[[spring-cloud-feign-overriding-defaults]]
82
91
=== Overriding Feign Defaults
83
92
@@ -905,6 +914,17 @@ The URL provided in the configuration properties remains unused.
905
914
906
915
|===
907
916
917
+
=== AOT and Native Image Support
918
+
919
+
Spring Cloud OpenFeign supports Spring AOT transformations and native images, however, only with refresh mode disabled, Feign clients refresh disabled (default setting) and <<attribute-resolution-mode,lazy `@FeignClient` attribute resolution>> disabled (default setting).
920
+
921
+
WARNING: If you want to run Spring Cloud OpenFeign clients in AOT or native image modes, make sure to set `spring.cloud.refresh.enabled` to `false`.
922
+
923
+
TIP: If you want to run Spring Cloud OpenFeign clients in AOT or native image modes, ensure `spring.cloud.openfeign.client.refresh-enabled` has not been set to `true`.
924
+
925
+
TIP: If you want to run Spring Cloud OpenFeign clients in AOT or native image modes, ensure `spring.cloud.openfeign.lazy-attributes-resolution` has not been set to `true`.
926
+
927
+
908
928
== Configuration properties
909
929
910
930
To see the list of all Spring Cloud OpenFeign related configuration properties please check link:appendix.html[the Appendix page].
Copy file name to clipboardExpand all lines: spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/FeignCircuitBreakerTargeter.java
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ class FeignCircuitBreakerTargeter implements Targeter {
39
39
}
40
40
41
41
@Override
42
-
public <T> Ttarget(FeignClientFactoryBeanfactory, Feign.Builderfeign, FeignContextcontext,
42
+
public <T> Ttarget(FeignClientFactoryBeanfactory, Feign.Builderfeign, FeignClientFactorycontext,
43
43
Target.HardCodedTarget<T> target) {
44
44
if (!(feigninstanceofFeignCircuitBreaker.Builderbuilder)) {
45
45
returnfeign.target(target);
@@ -56,20 +56,20 @@ public <T> T target(FeignClientFactoryBean factory, Feign.Builder feign, FeignCo
0 commit comments