Skip to content

Commit 052d972

Browse files
committed
Don't initialize spring.config.import bootstrapper if bootstrap on classpath.
Fixes gh-288
1 parent 14c127a commit 052d972

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperConfigServerBootstrapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ public class ZookeeperConfigServerBootstrapper implements BootstrapRegistryIniti
4545
@Override
4646
@SuppressWarnings("unchecked")
4747
public void initialize(BootstrapRegistry registry) {
48-
if (!ClassUtils.isPresent("org.springframework.cloud.config.client.ConfigServerInstanceProvider", null)) {
48+
if (!ClassUtils.isPresent("org.springframework.cloud.config.client.ConfigServerInstanceProvider", null) ||
49+
// don't run if bootstrap enabled, how to check the property?
50+
ClassUtils.isPresent("org.springframework.cloud.bootstrap.marker.Marker", null)) {
4951
return;
5052
}
5153
// create curator

0 commit comments

Comments
 (0)