Don't run bootstrapper if legacy bootstrap starter present.

Fixes gh-714
This commit is contained in:
spencergibb
2021-03-15 21:13:56 -04:00
parent b8f90a9845
commit 77c0349de2

View File

@@ -37,7 +37,9 @@ public class ConsulConfigServerBootstrapper implements Bootstrapper {
@Override
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 consul client