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
befcada4
Commit
befcada4
authored
Sep 25, 2015
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting
parent
d29839ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
RibbonAutoConfiguration.java
...amework/cloud/netflix/ribbon/RibbonAutoConfiguration.java
+22
-22
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonAutoConfiguration.java
View file @
befcada4
...
@@ -51,7 +51,6 @@ public class RibbonAutoConfiguration {
...
@@ -51,7 +51,6 @@ public class RibbonAutoConfiguration {
@Autowired
(
required
=
false
)
@Autowired
(
required
=
false
)
private
List
<
RibbonClientSpecification
>
configurations
=
new
ArrayList
<>();
private
List
<
RibbonClientSpecification
>
configurations
=
new
ArrayList
<>();
@Bean
@Bean
public
SpringClientFactory
springClientFactory
()
{
public
SpringClientFactory
springClientFactory
()
{
SpringClientFactory
factory
=
new
SpringClientFactory
();
SpringClientFactory
factory
=
new
SpringClientFactory
();
...
@@ -65,30 +64,31 @@ public class RibbonAutoConfiguration {
...
@@ -65,30 +64,31 @@ public class RibbonAutoConfiguration {
return
new
RibbonLoadBalancerClient
(
springClientFactory
());
return
new
RibbonLoadBalancerClient
(
springClientFactory
());
}
}
@Configuration
@Configuration
@ConditionalOnClass
(
HttpRequest
.
class
)
@ConditionalOnClass
(
HttpRequest
.
class
)
protected
static
class
RibbonClientConfig
{
protected
static
class
RibbonClientConfig
{
@Autowired
@Autowired
private
SpringClientFactory
springClientFactory
;
private
SpringClientFactory
springClientFactory
;
@Autowired
@Autowired
private
LoadBalancerClient
loadBalancerClient
;
private
LoadBalancerClient
loadBalancerClient
;
@Bean
@Bean
public
RestTemplateCustomizer
restTemplateCustomizer
()
{
public
RestTemplateCustomizer
restTemplateCustomizer
()
{
return
new
RestTemplateCustomizer
()
{
return
new
RestTemplateCustomizer
()
{
@Override
@Override
public
void
customize
(
RestTemplate
restTemplate
)
{
public
void
customize
(
RestTemplate
restTemplate
)
{
restTemplate
.
setRequestFactory
(
ribbonClientHttpRequestFactory
());
restTemplate
.
setRequestFactory
(
ribbonClientHttpRequestFactory
());
}
}
};
};
}
}
@Bean
@Bean
public
RibbonClientHttpRequestFactory
ribbonClientHttpRequestFactory
()
{
public
RibbonClientHttpRequestFactory
ribbonClientHttpRequestFactory
()
{
return
new
RibbonClientHttpRequestFactory
(
springClientFactory
,
loadBalancerClient
);
return
new
RibbonClientHttpRequestFactory
(
springClientFactory
,
}
loadBalancerClient
);
}
}
}
}
}
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