From b8e77279d2eec1956bcc96064938000ce8a9195c Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 29 Jan 2020 15:58:50 +0000 Subject: [PATCH] Sync docs from 2.1.x to gh-pages --- 2.1.x/multi/multi_spring-cloud-feign.html | 4 +++- 2.1.x/multi/multi_spring-cloud-openfeign.html | 2 +- 2.1.x/single/spring-cloud-openfeign.html | 6 ++++-- 2.1.x/spring-cloud-openfeign.xml | 10 ++++++++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/2.1.x/multi/multi_spring-cloud-feign.html b/2.1.x/multi/multi_spring-cloud-feign.html index 913a589a..fcf3d513 100644 --- a/2.1.x/multi/multi_spring-cloud-feign.html +++ b/2.1.x/multi/multi_spring-cloud-feign.html @@ -216,4 +216,6 @@ is used to annotate a POJO or Map parameter as a query parameter map.

For @GetMapping(path = "/demo") String demoEndpoint(@SpringQueryMap Params params); -}

\ No newline at end of file +}

1.11 Troubleshooting

1.11.1 Early Initialization Errors

Depending on how you are using your Feign clients you may see initialization errors when starting your application. +To work around this problem you can use an ObjectProvider when autowiring your client.

@Autowired
+ObjectProvider<TestFeginClient> testFeginClient;
\ No newline at end of file diff --git a/2.1.x/multi/multi_spring-cloud-openfeign.html b/2.1.x/multi/multi_spring-cloud-openfeign.html index 79cd7d38..5df85f10 100644 --- a/2.1.x/multi/multi_spring-cloud-openfeign.html +++ b/2.1.x/multi/multi_spring-cloud-openfeign.html @@ -1,3 +1,3 @@ - Spring Cloud OpenFeign

Spring Cloud OpenFeign


\ No newline at end of file + Spring Cloud OpenFeign

Spring Cloud OpenFeign


\ No newline at end of file diff --git a/2.1.x/single/spring-cloud-openfeign.html b/2.1.x/single/spring-cloud-openfeign.html index f32cae5e..312e3331 100644 --- a/2.1.x/single/spring-cloud-openfeign.html +++ b/2.1.x/single/spring-cloud-openfeign.html @@ -1,6 +1,6 @@ - Spring Cloud OpenFeign

Spring Cloud OpenFeign


2.1.5.BUILD-SNAPSHOT

This project provides OpenFeign integrations for Spring Boot apps through autoconfiguration + Spring Cloud OpenFeign

Spring Cloud OpenFeign


2.1.5.BUILD-SNAPSHOT

This project provides OpenFeign integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms.

1. Declarative REST Client: Feign

Feign is a declarative web service client. It makes writing web service clients easier. To use Feign create an interface and annotate it. It has pluggable annotation support including Feign annotations and JAX-RS annotations. Feign also supports pluggable encoders and decoders. Spring Cloud adds support for Spring MVC annotations and for using the same HttpMessageConverters used by default in Spring Web. Spring Cloud integrates Ribbon and Eureka to provide a load balanced http client when using Feign.

1.1 How to Include Feign

To include Feign in your project use the starter with group org.springframework.cloud and artifact id spring-cloud-starter-openfeign. See the Spring Cloud Project page for details on setting up your build system with the current Spring Cloud Release Train.

Example spring boot app

@SpringBootApplication
@@ -217,4 +217,6 @@ is used to annotate a POJO or Map parameter as a query parameter map.

For @GetMapping(path = "/demo") String demoEndpoint(@SpringQueryMap Params params); -}

\ No newline at end of file +}

1.11 Troubleshooting

1.11.1 Early Initialization Errors

Depending on how you are using your Feign clients you may see initialization errors when starting your application. +To work around this problem you can use an ObjectProvider when autowiring your client.

@Autowired
+ObjectProvider<TestFeginClient> testFeginClient;
\ No newline at end of file diff --git a/2.1.x/spring-cloud-openfeign.xml b/2.1.x/spring-cloud-openfeign.xml index d1b8c382..0d71f0a2 100644 --- a/2.1.x/spring-cloud-openfeign.xml +++ b/2.1.x/spring-cloud-openfeign.xml @@ -425,5 +425,15 @@ public class DemoTemplate { String demoEndpoint(@SpringQueryMap Params params); } +
+Troubleshooting +
+Early Initialization Errors +Depending on how you are using your Feign clients you may see initialization errors when starting your application. +To work around this problem you can use an ObjectProvider when autowiring your client. +@Autowired +ObjectProvider<TestFeginClient> testFeginClient; +
+
\ No newline at end of file