Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-cloud-netflix
Commits
90d7e5df
Commit
90d7e5df
authored
Jan 15, 2015
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct Javadocs in *FeignClient
Fixes gh-151
parent
89ca05bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
14 deletions
+26
-14
FeignClient.java
.../org/springframework/cloud/netflix/feign/FeignClient.java
+9
-2
FeignClientScan.java
.../springframework/cloud/netflix/feign/FeignClientScan.java
+17
-12
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClient.java
View file @
90d7e5df
...
...
@@ -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
;
}
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientScan.java
View file @
90d7e5df
...
...
@@ -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'.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment