Commit 90d7e5df by Dave Syer

Correct Javadocs in *FeignClient

Fixes gh-151
parent 89ca05bf
...@@ -3,6 +3,8 @@ package org.springframework.cloud.netflix.feign; ...@@ -3,6 +3,8 @@ package org.springframework.cloud.netflix.feign;
import java.lang.annotation.*; import java.lang.annotation.*;
/** /**
* Annotation for interfaces declaring that a REST client with that interface should be
* created (e.g. for autowiring into another component).
* @author Spencer Gibb * @author Spencer Gibb
*/ */
@Target(ElementType.TYPE) @Target(ElementType.TYPE)
...@@ -10,9 +12,14 @@ import java.lang.annotation.*; ...@@ -10,9 +12,14 @@ import java.lang.annotation.*;
@Documented @Documented
public @interface FeignClient { public @interface FeignClient {
/** /**
* @return serviceId if loadbalance is true, url otherwise * @return serviceId if loadbalance is true, url otherwise There is no need to prefix
* No need to prefix serviceId with http:// * serviceId with http://.
*/ */
String value(); String value();
/**
* @return true if calls should be load balanced (assuming a load balancer is
* available).
*/
boolean loadbalance() default true; boolean loadbalance() default true;
} }
...@@ -9,11 +9,13 @@ import java.lang.annotation.Target; ...@@ -9,11 +9,13 @@ import java.lang.annotation.Target;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
/** /**
* Configures component scanning directives for use with @{@link org.springframework.context.annotation.Configuration} classes. * Scans for interfaces that declare they are feign clients (via {@link FeignClient
* Scan Spring Integration specific components. * <code>@FeignClient</code>}). Configures component scanning directives for use with
* {@link org.springframework.context.annotation.Configuration
* <code>@Configuration</code>} classes.
* *
* @author Artem Bilan * @author Artem Bilan
* @since 4.0 * @since 1.0
*/ */
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE) @Target(ElementType.TYPE)
...@@ -22,9 +24,8 @@ import org.springframework.context.annotation.Import; ...@@ -22,9 +24,8 @@ import org.springframework.context.annotation.Import;
public @interface FeignClientScan { public @interface FeignClientScan {
/** /**
* Alias for the {@link #basePackages()} attribute. * Alias for the {@link #basePackages()} attribute. Allows for more concise annotation
* Allows for more concise annotation declarations e.g.: * declarations e.g.: {@code @ComponentScan("org.my.pkg")} instead of
* {@code @ComponentScan("org.my.pkg")} instead of
* {@code @ComponentScan(basePackages="org.my.pkg")}. * {@code @ComponentScan(basePackages="org.my.pkg")}.
* *
* @return the array of 'basePackages'. * @return the array of 'basePackages'.
...@@ -33,18 +34,22 @@ public @interface FeignClientScan { ...@@ -33,18 +34,22 @@ public @interface FeignClientScan {
/** /**
* Base packages to scan for annotated components. * Base packages to scan for annotated components.
* <p>{@link #value()} is an alias for (and mutually exclusive with) this attribute. * <p>
* <p>Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names. * {@link #value()} is an alias for (and mutually exclusive with) this attribute.
* <p>
* Use {@link #basePackageClasses()} for a type-safe alternative to String-based
* package names.
* *
* @return the array of 'basePackages'. * @return the array of 'basePackages'.
*/ */
String[] basePackages() default {}; String[] basePackages() default {};
/** /**
* Type-safe alternative to {@link #basePackages()} for specifying the packages * Type-safe alternative to {@link #basePackages()} for specifying the packages to
* to scan for annotated components. The package of each class specified will be scanned. * scan for annotated components. The package of each class specified will be scanned.
* <p>Consider creating a special no-op marker class or interface in each package * <p>
* that serves no purpose other than being referenced by this attribute. * Consider creating a special no-op marker class or interface in each package that
* serves no purpose other than being referenced by this attribute.
* *
* @return the array of 'basePackageClasses'. * @return the array of 'basePackageClasses'.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment