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
Show 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;
...
@@ -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
;
}
}
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;
...
@@ -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'.
*/
*/
...
...
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