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
5dccd03d
Commit
5dccd03d
authored
Sep 25, 2015
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken test
This test made wrong assumptions about the content of the child context when trying to simulate autoconfiguration. It needed an extra EurekaClientAutoConfiguration.
parent
f904b52a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
DiscoveryClientConfigServiceAutoConfiguration.java
...config/DiscoveryClientConfigServiceAutoConfiguration.java
+7
-5
No files found.
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/config/DiscoveryClientConfigServiceAutoConfiguration.java
View file @
5dccd03d
...
@@ -32,15 +32,16 @@ import com.netflix.discovery.DiscoveryManager;
...
@@ -32,15 +32,16 @@ import com.netflix.discovery.DiscoveryManager;
import
com.netflix.discovery.EurekaClientConfig
;
import
com.netflix.discovery.EurekaClientConfig
;
/**
/**
* Bootstrap configuration for a config client that wants to lookup the config
* Bootstrap configuration for a config client that wants to lookup the config
server via
*
server via
discovery.
* discovery.
*
*
* @author Dave Syer
* @author Dave Syer
*/
*/
@ConditionalOnBean
({
EurekaDiscoveryClientConfiguration
.
class
})
@ConditionalOnBean
({
EurekaDiscoveryClientConfiguration
.
class
})
@ConditionalOnProperty
(
value
=
"spring.cloud.config.discovery.enabled"
,
matchIfMissing
=
false
)
@ConditionalOnProperty
(
value
=
"spring.cloud.config.discovery.enabled"
,
matchIfMissing
=
false
)
@Configuration
@Configuration
public
class
DiscoveryClientConfigServiceAutoConfiguration
implements
ApplicationListener
<
RefreshScopeRefreshedEvent
>
{
public
class
DiscoveryClientConfigServiceAutoConfiguration
implements
ApplicationListener
<
RefreshScopeRefreshedEvent
>
{
@Autowired
@Autowired
private
EurekaClientConfig
clientConfig
;
private
EurekaClientConfig
clientConfig
;
...
@@ -58,10 +59,11 @@ public class DiscoveryClientConfigServiceAutoConfiguration implements Applicatio
...
@@ -58,10 +59,11 @@ public class DiscoveryClientConfigServiceAutoConfiguration implements Applicatio
DiscoveryManager
.
getInstance
().
getDiscoveryClient
().
shutdown
();
DiscoveryManager
.
getInstance
().
getDiscoveryClient
().
shutdown
();
}
}
ApplicationInfoManager
.
getInstance
().
initComponent
(
this
.
instanceConfig
);
ApplicationInfoManager
.
getInstance
().
initComponent
(
this
.
instanceConfig
);
DiscoveryManager
.
getInstance
().
initComponent
(
this
.
instanceConfig
,
this
.
clientConfig
);
DiscoveryManager
.
getInstance
().
initComponent
(
this
.
instanceConfig
,
this
.
clientConfig
);
this
.
lifecycle
.
start
();
this
.
lifecycle
.
start
();
}
}
@Override
@Override
public
void
onApplicationEvent
(
RefreshScopeRefreshedEvent
arg0
)
{
public
void
onApplicationEvent
(
RefreshScopeRefreshedEvent
arg0
)
{
init
();
init
();
...
...
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