Commit 90d7e5df by Dave Syer

Correct Javadocs in *FeignClient

Fixes gh-151
parent 89ca05bf
......@@ -3,6 +3,8 @@ package org.springframework.cloud.netflix.feign;
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
*/
@Target(ElementType.TYPE)
......@@ -10,9 +12,14 @@ import java.lang.annotation.*;
@Documented
public @interface FeignClient {
/**
* @return serviceId if loadbalance is true, url otherwise
* No need to prefix serviceId with http://
* @return serviceId if loadbalance is true, url otherwise There is no need to prefix
* serviceId with http://.
*/
String value();
/**
* @return true if calls should be load balanced (assuming a load balancer is
* available).
*/
boolean loadbalance() default true;
}
......@@ -9,11 +9,13 @@ import java.lang.annotation.Target;
import org.springframework.context.annotation.Import;
/**
* Configures component scanning directives for use with @{@link org.springframework.context.annotation.Configuration} classes.
* Scan Spring Integration specific components.
* Scans for interfaces that declare they are feign clients (via {@link FeignClient
* <code>@FeignClient</code>}). Configures component scanning directives for use with
* {@link org.springframework.context.annotation.Configuration
* <code>@Configuration</code>} classes.
*
* @author Artem Bilan
* @since 4.0
* @since 1.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
......@@ -22,9 +24,8 @@ import org.springframework.context.annotation.Import;
public @interface FeignClientScan {
/**
* Alias for the {@link #basePackages()} attribute.
* Allows for more concise annotation declarations e.g.:
* {@code @ComponentScan("org.my.pkg")} instead of
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation
* declarations e.g.: {@code @ComponentScan("org.my.pkg")} instead of
* {@code @ComponentScan(basePackages="org.my.pkg")}.
*
* @return the array of 'basePackages'.
......@@ -33,18 +34,22 @@ public @interface FeignClientScan {
/**
* Base packages to scan for annotated components.
* <p>{@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.
* <p>
* {@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'.
*/
String[] basePackages() default {};
/**
* Type-safe alternative to {@link #basePackages()} for specifying the packages
* to 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
* that serves no purpose other than being referenced by this attribute.
* Type-safe alternative to {@link #basePackages()} for specifying the packages to
* 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 that
* serves no purpose other than being referenced by this attribute.
*
* @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