Don't initialize spring.config.import bootstrapper if bootstrap on classpath.

Fixes gh-288
This commit is contained in:
spencergibb
2021-12-10 12:23:50 -05:00
parent aae46ebafc
commit 599ae49f87

View File

@@ -45,7 +45,9 @@ public class ZookeeperConfigServerBootstrapper implements Bootstrapper {
@Override
@SuppressWarnings("unchecked")
public void intitialize(BootstrapRegistry registry) {
if (!ClassUtils.isPresent("org.springframework.cloud.config.client.ConfigServerInstanceProvider", null)) {
if (!ClassUtils.isPresent("org.springframework.cloud.config.client.ConfigServerInstanceProvider", null) ||
// don't run if bootstrap enabled, how to check the property?
ClassUtils.isPresent("org.springframework.cloud.bootstrap.marker.Marker", null)) {
return;
}
// create curator