Browse Source

Merge pull request #7 from Netflix/javadoc

comply with jdk 8 javadoc strictness
pull/8/merge 2.0.0
Adrian Cole 11 years ago
parent
commit
28ad52aef6
  1. 6
      feign-core/src/main/java/feign/Body.java
  2. 2
      feign-core/src/main/java/feign/Client.java
  3. 8
      feign-core/src/main/java/feign/Feign.java
  4. 12
      feign-core/src/main/java/feign/Headers.java
  5. 6
      feign-core/src/main/java/feign/Request.java
  6. 14
      feign-core/src/main/java/feign/RequestLine.java
  7. 66
      feign-core/src/main/java/feign/RequestTemplate.java
  8. 8
      feign-core/src/main/java/feign/Response.java
  9. 2
      feign-core/src/main/java/feign/Retryer.java
  10. 16
      feign-core/src/main/java/feign/Target.java
  11. 8
      feign-core/src/main/java/feign/codec/BodyEncoder.java
  12. 10
      feign-core/src/main/java/feign/codec/Decoder.java
  13. 24
      feign-core/src/main/java/feign/codec/Decoders.java
  14. 15
      feign-core/src/main/java/feign/codec/ErrorDecoder.java
  15. 4
      feign-core/src/main/java/feign/codec/FormEncoder.java
  16. 4
      feign-core/src/test/java/feign/DefaultContractTest.java
  17. 2
      feign-jaxrs/src/test/java/feign/jaxrs/JAXRSContractTest.java
  18. 2
      feign-ribbon/src/main/java/feign/ribbon/LoadBalancingTarget.java
  19. 4
      feign-ribbon/src/main/java/feign/ribbon/RibbonModule.java

6
feign-core/src/main/java/feign/Body.java

@ -10,14 +10,14 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -10,14 +10,14 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* A possibly templated body of a PUT or POST command. variables wrapped in curly braces are expanded before the
* request is submitted.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* &#064;Body(&quot;&lt;v01:getResourceRecordsOfZone&gt;&lt;zoneName&gt;{zoneName}&lt;/zoneName&gt;&lt;rrType&gt;0&lt;/rrType&gt;&lt;/v01:getResourceRecordsOfZone&gt;&quot;)
* List&lt;Record&gt; listByZone(&#64;Named(&quot;zoneName&quot;) String zoneName);
* </pre>
* <p/>
* <br>
* Note that if you'd like curly braces literally in the body, urlencode
* them first.
*

2
feign-core/src/main/java/feign/Client.java

@ -19,9 +19,7 @@ import java.io.IOException; @@ -19,9 +19,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Collection;

8
feign-core/src/main/java/feign/Feign.java

@ -36,7 +36,7 @@ import feign.codec.FormEncoder; @@ -36,7 +36,7 @@ import feign.codec.FormEncoder;
/**
* Feign's purpose is to ease development against http apis that feign
* restfulness.
* <p/>
* <br>
* In implementation, Feign is a {@link Feign#newInstance factory} for
* generating {@link Target targeted} http apis.
*/
@ -122,11 +122,11 @@ public abstract class Feign { @@ -122,11 +122,11 @@ public abstract class Feign {
}
/**
* <p/>
* <br>
* Configuration keys are formatted as unresolved <a href=
* "http://docs.oracle.com/javase/6/docs/jdk/api/javadoc/doclet/com/sun/javadoc/SeeTag.html"
* >see tags</a>.
* <p/>
* <br>
* For example.
* <ul>
* <li>{@code Route53}: would match a class such as
@ -138,7 +138,7 @@ public abstract class Feign { @@ -138,7 +138,7 @@ public abstract class Feign {
* <li>{@code Route53#listByNameAndType(String, String)}: would match a
* method such as {@code denominator.route53.Route53#listAt(String, String)}
* </ul>
* <p/>
* <br>
* Note that there is no whitespace expected in a key!
*/
public static String configKey(Method method) {

12
feign-core/src/main/java/feign/Headers.java

@ -8,7 +8,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -8,7 +8,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Expands headers supplied in the {@code value}. Variables are permitted as values.
* <p/>
* <br>
* <pre>
* &#64;RequestLine("GET /")
* &#64;Headers("Cache-Control: max-age=640000")
@ -21,13 +21,13 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -21,13 +21,13 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* }) void post(&#64;Named("token") String token);
* ...
* </pre>
* <p/>
* <br>
* <strong>Note:</strong> Headers do not overwrite each other. All headers with the same name will
* be included in the request.
* <h4>Relationship to JAXRS</h4>
* <p/>
* <br><br><b>Relationship to JAXRS</b><br>
* <br>
* The following two forms are identical.
* <p/>
* <br>
* Feign:
* <pre>
* &#64;RequestLine("POST /")
@ -36,7 +36,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -36,7 +36,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* }) void post(&#64;Named("token") String token);
* ...
* </pre>
* <p/>
* <br>
* JAX-RS:
* <pre>
* &#64;POST &#64;Path("/")

6
feign-core/src/main/java/feign/Request.java

@ -25,9 +25,9 @@ import static feign.Util.valuesOrEmpty; @@ -25,9 +25,9 @@ import static feign.Util.valuesOrEmpty;
/**
* An immutable request to an http server.
* <p/>
* <h4>Note</h4>
* <p/>
* <br>
* <br><br><b>Note</b><br>
* <br>
* Since {@link Feign} is designed for non-binary apis, and expectations are
* that any request can be replayed, we only support a String body.
*/

14
feign-core/src/main/java/feign/RequestLine.java

@ -8,7 +8,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -8,7 +8,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Expands the request-line supplied in the {@code value}, permitting path and query variables,
* or just the http method.
* <p/>
* <br>
* <pre>
* ...
* &#64;RequestLine("POST /servers")
@ -24,25 +24,25 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -24,25 +24,25 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* </pre>
* HTTP version suffix is optional, but permitted. There are no guarantees this version will impact that
* sent by the client.
* <p/>
* <br>
* <pre>
* &#64;RequestLine("POST /servers HTTP/1.1")
* ...
* </pre>
* <p/>
* <br>
* <strong>Note:</strong> Query params do not overwrite each other. All queries with the same name will
* be included in the request.
* <h4>Relationship to JAXRS</h4>
* <p/>
* <br><br><b>Relationship to JAXRS</b><br>
* <br>
* The following two forms are identical.
* <p/>
* <br>
* Feign:
* <pre>
* &#64;RequestLine("GET /servers/{serverId}?count={count}")
* void get(&#64;Named("serverId") String serverId, &#64;Named("count") int count);
* ...
* </pre>
* <p/>
* <br>
* JAX-RS:
* <pre>
* &#64;GET &#64;Path("/servers/{serverId}")

66
feign-core/src/main/java/feign/RequestTemplate.java

@ -37,9 +37,9 @@ import static feign.Util.valuesOrEmpty; @@ -37,9 +37,9 @@ import static feign.Util.valuesOrEmpty;
/**
* Builds a request to an http target. Not thread safe.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* A combination of {@code javax.ws.rs.client.WebTarget} and
* {@code javax.ws.rs.client.Invocation.Builder}, ensuring you can modify any
* part of the request. However, this object is mutable, so needs to be guarded
@ -74,10 +74,10 @@ public final class RequestTemplate implements Serializable { @@ -74,10 +74,10 @@ public final class RequestTemplate implements Serializable {
/**
* Targets a template to this target, adding the {@link #url() base url} and
* any authentication headers.
* <p/>
* <p/>
* <br>
* <br>
* For example:
* <p/>
* <br>
* <pre>
* public Request apply(RequestTemplate input) {
* input.insert(0, url());
@ -85,9 +85,9 @@ public final class RequestTemplate implements Serializable { @@ -85,9 +85,9 @@ public final class RequestTemplate implements Serializable {
* return input.asRequest();
* }
* </pre>
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* This call is similar to
* {@code javax.ws.rs.client.WebTarget.resolveTemplates(templateValues, true)}
* , except that the template values apply to any part of the request, not
@ -151,7 +151,7 @@ public final class RequestTemplate implements Serializable { @@ -151,7 +151,7 @@ public final class RequestTemplate implements Serializable {
/**
* Expands a {@code template}, such as {@code username}, using the {@code variables} supplied. Any unresolved
* parameters will remain.
* <p/>
* <br>
* Note that if you'd like curly braces literally in the {@code template},
* urlencode them first.
*
@ -227,16 +227,16 @@ public final class RequestTemplate implements Serializable { @@ -227,16 +227,16 @@ public final class RequestTemplate implements Serializable {
/**
* Replaces queries with the specified {@code configKey} with url decoded
* {@code values} supplied.
* <p/>
* <br>
* When the {@code value} is {@code null}, all queries with the {@code configKey}
* are removed.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code WebTarget.query}, except the values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.query(&quot;Signature&quot;, &quot;{signature}&quot;);
* </pre>
@ -274,13 +274,13 @@ public final class RequestTemplate implements Serializable { @@ -274,13 +274,13 @@ public final class RequestTemplate implements Serializable {
/**
* Replaces all existing queries with the newly supplied url decoded
* queries.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code WebTarget.queries}, except the values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.queries(ImmutableMultimap.of(&quot;Signature&quot;, &quot;{signature}&quot;));
* </pre>
@ -323,17 +323,17 @@ public final class RequestTemplate implements Serializable { @@ -323,17 +323,17 @@ public final class RequestTemplate implements Serializable {
/**
* Replaces headers with the specified {@code configKey} with the
* {@code values} supplied.
* <p/>
* <br>
* When the {@code value} is {@code null}, all headers with the {@code configKey}
* are removed.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code WebTarget.queries} and {@code javax.ws.rs.client.Invocation.Builder.header},
* except the values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.query(&quot;X-Application-Version&quot;, &quot;{version}&quot;);
* </pre>
@ -364,14 +364,14 @@ public final class RequestTemplate implements Serializable { @@ -364,14 +364,14 @@ public final class RequestTemplate implements Serializable {
/**
* Replaces all existing headers with the newly supplied headers.
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Like {@code Invocation.Builder.headers(MultivaluedMap)}, except the
* values can be templatized.
* <p/>
* <br>
* ex.
* <p/>
* <br>
* <pre>
* template.headers(ImmutableMultimap.of(&quot;X-Application-Version&quot;, &quot;{version}&quot;));
* </pre>
@ -399,7 +399,7 @@ public final class RequestTemplate implements Serializable { @@ -399,7 +399,7 @@ public final class RequestTemplate implements Serializable {
/**
* replaces the {@link feign.Util#CONTENT_LENGTH} header.
* <p/>
* <br>
* Usually populated by {@link feign.codec.BodyEncoder} or {@link feign.codec.FormEncoder}
*
* @see Request#body()

8
feign-core/src/main/java/feign/Response.java

@ -61,7 +61,7 @@ public final class Response { @@ -61,7 +61,7 @@ public final class Response {
/**
* status code. ex {@code 200}
*
* @see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" />
* See <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" >rfc2616</a>
*/
public int status() {
return status;
@ -86,9 +86,9 @@ public final class Response { @@ -86,9 +86,9 @@ public final class Response {
/**
* length in bytes, if known. Null if not.
* <p/>
* <h4>Note</h4> This is an integer as most implementations cannot do
* bodies > 2GB. Moreover, the scope of this interface doesn't include
* <br>
* <br><br><b>Note</b><br> This is an integer as most implementations cannot do
* bodies greater than 2GB. Moreover, the scope of this interface doesn't include
* large bodies.
*/
Integer length();

2
feign-core/src/main/java/feign/Retryer.java

@ -79,7 +79,7 @@ public interface Retryer { @@ -79,7 +79,7 @@ public interface Retryer {
/**
* Calculates the time interval to a retry attempt.
* <p/>
* <br>
* The interval increases exponentially with each attempt, at a rate of
* nextInterval *= 1.5 (where 1.5 is the backoff factor), to the maximum
* interval.

16
feign-core/src/main/java/feign/Target.java

@ -21,8 +21,8 @@ import static feign.Util.checkNotNull; @@ -21,8 +21,8 @@ import static feign.Util.checkNotNull;
import static feign.Util.emptyToNull;
/**
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* Similar to {@code javax.ws.rs.client.WebTarget}, as it produces requests.
* However, {@link RequestTemplate} is a closer match to {@code WebTarget}.
*
@ -41,10 +41,10 @@ public interface Target<T> { @@ -41,10 +41,10 @@ public interface Target<T> {
/**
* Targets a template to this target, adding the {@link #url() base url} and
* any authentication headers.
* <p/>
* <p/>
* <br>
* <br>
* For example:
* <p/>
* <br>
* <pre>
* public Request apply(RequestTemplate input) {
* input.insert(0, url());
@ -52,9 +52,9 @@ public interface Target<T> { @@ -52,9 +52,9 @@ public interface Target<T> {
* return input.asRequest();
* }
* </pre>
* <p/>
* <h4>relationship to JAXRS 2.0</h4>
* <p/>
* <br>
* <br><br><b>relationship to JAXRS 2.0</b><br>
* <br>
* This call is similar to {@code javax.ws.rs.client.WebTarget.request()},
* except that we expect transient, but necessary decoration to be applied
* on invocation.

8
feign-core/src/main/java/feign/codec/BodyEncoder.java

@ -21,9 +21,9 @@ public interface BodyEncoder { @@ -21,9 +21,9 @@ public interface BodyEncoder {
/**
* Converts objects to an appropriate representation. Can affect any part of
* {@link RequestTemplate}.
* <p/>
* <br>
* Ex.
* <p/>
* <br>
* <pre>
* public class GsonEncoder implements BodyEncoder {
* private final Gson gson;
@ -38,10 +38,10 @@ public interface BodyEncoder { @@ -38,10 +38,10 @@ public interface BodyEncoder {
* }
* }
* </pre>
* <p/>
* <br>
* If a parameter has no {@code *Param} annotation, it is passed to this
* method.
* <p/>
* <br>
* <pre>
* &#064;POST
* &#064;Path(&quot;/&quot;)

10
feign-core/src/main/java/feign/codec/Decoder.java

@ -24,9 +24,9 @@ import feign.Response; @@ -24,9 +24,9 @@ import feign.Response;
/**
* Decodes an HTTP response into a given type. Invoked when
* {@link Response#status()} is in the 2xx range.
* <p/>
* <br>
* Ex.
* <p/>
* <br>
* <pre>
* public class GsonDecoder extends Decoder {
* private final Gson gson;
@ -41,9 +41,9 @@ import feign.Response; @@ -41,9 +41,9 @@ import feign.Response;
* }
* }
* </pre>
* <p/>
* <h4>Error handling</h4>
* <p/>
* <br>
* <br><br><b>Error handling</b><br>
* <br>
* Responses where {@link Response#status()} is not in the 2xx range are
* classified as errors, addressed by the {@link ErrorDecoder}. That said,
* certain RPC apis return errors defined in the {@link Response#body()} even on

24
feign-core/src/main/java/feign/codec/Decoders.java

@ -29,9 +29,9 @@ import static java.util.regex.Pattern.compile; @@ -29,9 +29,9 @@ import static java.util.regex.Pattern.compile;
/**
* Static utility methods pertaining to {@code Decoder} instances.
* <p/>
* <h4>Pattern Decoders</h4>
* <p/>
* <br>
* <br><br><b>Pattern Decoders</b><br>
* <br>
* Pattern decoders typically require less initialization, dependencies, and
* code than reflective decoders, but not can be awkward to those unfamiliar
* with regex. Typical use of pattern decoders is to grab a single field from an
@ -54,9 +54,9 @@ public class Decoders { @@ -54,9 +54,9 @@ public class Decoders {
/**
* The first match group is applied to {@code applyGroups} and result
* returned. If no matches are found, the response is null;
* <p/>
* <br>
* Ex. to pull the first interesting element from an xml response:
* <p/>
* <br>
* <pre>
* decodeFirstDirPoolID = transformFirstGroup(&quot;&lt;DirPoolID[&circ;&gt;]*&gt;([&circ;&lt;]+)&lt;/DirPoolID&gt;&quot;, ToLong.INSTANCE);
* </pre>
@ -83,10 +83,10 @@ public class Decoders { @@ -83,10 +83,10 @@ public class Decoders {
/**
* shortcut for {@link Decoders#transformFirstGroup(String, ApplyFirstGroup)} when
* {@code String} is the type you are decoding into.
* <p/>
* <p/>
* <br>
* <br>
* Ex. to pull the first interesting element from an xml response:
* <p/>
* <br>
* <pre>
* decodeFirstDirPoolID = firstGroup(&quot;&lt;DirPoolID[&circ;&gt;]*&gt;([&circ;&lt;]+)&lt;/DirPoolID&gt;&quot;);
* </pre>
@ -99,10 +99,10 @@ public class Decoders { @@ -99,10 +99,10 @@ public class Decoders {
* On the each find the first match group is applied to
* {@code applyFirstGroup} and added to the list returned. If no matches are
* found, the response is an empty list;
* <p/>
* <br>
* Ex. to pull a list zones constructed from http paths starting with
* {@code /Rest/Zone/}:
* <p/>
* <br>
* <pre>
* decodeListOfZones = transformEachFirstGroup(&quot;/REST/Zone/([&circ;/]+)/&quot;, ToZone.INSTANCE);
* </pre>
@ -131,10 +131,10 @@ public class Decoders { @@ -131,10 +131,10 @@ public class Decoders {
/**
* shortcut for {@link Decoders#transformEachFirstGroup(String, ApplyFirstGroup)}
* when {@code List<String>} is the type you are decoding into.
* <p/>
* <br>
* Ex. to pull a list zones names, which are http paths starting with
* {@code /Rest/Zone/}:
* <p/>
* <br>
* <pre>
* decodeListOfZonesNames = eachFirstGroup(&quot;/REST/Zone/([&circ;/]+)/&quot;);
* </pre>

15
feign-core/src/main/java/feign/codec/ErrorDecoder.java

@ -38,9 +38,9 @@ import static java.util.concurrent.TimeUnit.SECONDS; @@ -38,9 +38,9 @@ import static java.util.concurrent.TimeUnit.SECONDS;
* fallback to a default value. Falling back to null on
* {@link Response#status() status 404}, or converting out to a throttle
* exception are examples of this in use.
* <p/>
* <br>
* Ex.
* <p/>
* <br>
* <pre>
* class IllegalArgumentExceptionOn404Decoder extends ErrorDecoder {
*
@ -64,8 +64,7 @@ public interface ErrorDecoder { @@ -64,8 +64,7 @@ public interface ErrorDecoder {
* {@link RetryableException}
*
* @param methodKey {@link feign.Feign#configKey} of the java method that invoked the request. ex. {@code IAM#getUser()}
* @param response HTTP response where {@link Response#status() status} >=
* {@code 300}.
* @param response HTTP response where {@link Response#status() status} is greater than or equal to {@code 300}.
* @param type Target object type.
* @return instance of {@code type}
* @throws Throwable IOException, if there was a network error reading the
@ -92,10 +91,10 @@ public interface ErrorDecoder { @@ -92,10 +91,10 @@ public interface ErrorDecoder {
/**
* Decodes a {@link feign.Util#RETRY_AFTER} header into an absolute date,
* if possible.
*
* @see <a
* href="https://tools.ietf.org/html/rfc2616#section-14.37">Retry-After
* format</a>
* <br>
* See <a
* href="https://tools.ietf.org/html/rfc2616#section-14.37">Retry-After
* format</a>
*/
static class RetryAfterDecoder {
static final DateFormat RFC822_FORMAT = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", US);

4
feign-core/src/main/java/feign/codec/FormEncoder.java

@ -23,10 +23,10 @@ public interface FormEncoder { @@ -23,10 +23,10 @@ public interface FormEncoder {
/**
* FormParam encoding
* <p/>
* <br>
* If any parameters are found in {@link feign.MethodMetadata#formParams()}, they will be
* collected and passed as {code formParams}
* <p/>
* <br>
* <pre>
* &#064;POST
* &#064;Path(&quot;/&quot;)

4
feign-core/src/test/java/feign/DefaultContractTest.java

@ -20,14 +20,14 @@ import com.google.common.collect.ImmutableSet; @@ -20,14 +20,14 @@ import com.google.common.collect.ImmutableSet;
import org.testng.annotations.Test;
import java.lang.annotation.*;
import java.net.URI;
import javax.inject.Named;
import static feign.Util.CONTENT_TYPE;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.*;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
/**

2
feign-jaxrs/src/test/java/feign/jaxrs/JAXRSContractTest.java

@ -26,7 +26,6 @@ import java.lang.annotation.RetentionPolicy; @@ -26,7 +26,6 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.net.URI;
import javax.inject.Named;
import javax.ws.rs.DELETE;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
@ -41,7 +40,6 @@ import javax.ws.rs.QueryParam; @@ -41,7 +40,6 @@ import javax.ws.rs.QueryParam;
import feign.Body;
import feign.MethodMetadata;
import feign.RequestLine;
import feign.Response;
import static feign.Util.CONTENT_TYPE;

2
feign-ribbon/src/main/java/feign/ribbon/LoadBalancingTarget.java

@ -33,7 +33,7 @@ import static java.lang.String.format; @@ -33,7 +33,7 @@ import static java.lang.String.format;
/**
* Basic integration for {@link com.netflix.loadbalancer.ILoadBalancer loadbalancer-aware} targets.
* Using this will enable dynamic url discovery via ribbon including incrementing server request counts.
* <p/>
* <br>
* Ex.
* <pre>
* MyService api = Feign.create(LoadBalancingTarget.create(MyService.class, "http://myAppProd"))

4
feign-ribbon/src/main/java/feign/ribbon/RibbonModule.java

@ -36,11 +36,11 @@ import feign.Response; @@ -36,11 +36,11 @@ import feign.Response;
/**
* Adding this module will override URL resolution of {@link feign.Client Feign's client},
* adding smart routing and resiliency capabilities provided by Ribbon.
* <p/>
* <br>
* When using this, ensure the {@link feign.Target#url()} is set to as {@code http://clientName}
* or {@code https://clientName}. {@link com.netflix.client.config.IClientConfig#getClientName() clientName}
* will lookup the real url and port of your service dynamically.
* <p/>
* <br>
* Ex.
* <pre>
* MyService api = Feign.create(MyService.class, "http://myAppProd", new RibbonModule());

Loading…
Cancel
Save