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
a7c6c88f
Commit
a7c6c88f
authored
Dec 01, 2014
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed RibbonLoadBalancerClient to FeignRibbonClient
parent
3d7cc707
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
FeignAutoConfiguration.java
...framework/cloud/netflix/feign/FeignAutoConfiguration.java
+3
-2
FeignConfigurer.java
.../springframework/cloud/netflix/feign/FeignConfigurer.java
+0
-2
FeignRibbonClient.java
...amework/cloud/netflix/feign/ribbon/FeignRibbonClient.java
+7
-5
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignAutoConfiguration.java
View file @
a7c6c88f
...
...
@@ -6,7 +6,7 @@ import feign.Feign;
import
feign.Logger
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.cloud.netflix.feign.ribbon.
RibbonLoadBalancer
Client
;
import
org.springframework.cloud.netflix.feign.ribbon.
FeignRibbon
Client
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.cloud.netflix.archaius.ArchaiusAutoConfiguration
;
...
...
@@ -15,6 +15,7 @@ import com.netflix.loadbalancer.ILoadBalancer;
/**
* @author Spencer Gibb
* @author Julien Roy
*/
@Configuration
@ConditionalOnClass
(
Feign
.
class
)
...
...
@@ -43,5 +44,5 @@ public class FeignAutoConfiguration {
@Bean
@ConditionalOnClass
(
ILoadBalancer
.
class
)
public
Client
feignRibbonClient
()
{
return
new
RibbonLoadBalancer
Client
();
}
public
Client
feignRibbonClient
()
{
return
new
FeignRibbon
Client
();
}
}
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignConfigurer.java
View file @
a7c6c88f
...
...
@@ -41,8 +41,6 @@ public class FeignConfigurer {
Client
ribbonClient
;
protected
Feign
.
Builder
feign
()
{
//ConfigurationManager.getConfigInstance().setProperty("exampleBackend.ribbon.listOfServers", "localhost:7080");
//exampleBackend.ribbon.NIWSServerListClassName=my.package.MyServerList
return
Feign
.
builder
()
.
logger
(
logger
)
.
encoder
(
encoder
)
...
...
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/ribbon/
RibbonLoadBalancer
Client.java
→
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/ribbon/
FeignRibbon
Client.java
View file @
a7c6c88f
...
...
@@ -7,9 +7,6 @@ import javax.net.ssl.HostnameVerifier;
import
javax.net.ssl.HttpsURLConnection
;
import
javax.net.ssl.SSLSocketFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.netflix.ribbon.RibbonClientPreprocessor
;
import
com.google.common.base.Throwables
;
import
com.netflix.client.ClientException
;
import
com.netflix.client.ClientFactory
;
...
...
@@ -22,9 +19,10 @@ import feign.Request;
import
feign.Response
;
/**
* @author: Julien Roy
* @author Julien Roy
* @author Spencer Gibb
*/
public
class
RibbonLoadBalancer
Client
implements
Client
{
public
class
FeignRibbon
Client
implements
Client
{
private
Client
defaultClient
=
new
Default
(
new
Lazy
<
SSLSocketFactory
>()
{
...
...
@@ -62,4 +60,8 @@ public class RibbonLoadBalancerClient implements Client {
ILoadBalancer
lb
=
ClientFactory
.
getNamedLoadBalancer
(
clientName
);
return
new
RibbonLoadBalancer
(
defaultClient
,
lb
,
config
);
}
public
void
setDefaultClient
(
Client
defaultClient
)
{
this
.
defaultClient
=
defaultClient
;
}
}
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