Skip to content

Commit

Permalink
Adds ConditionalOnMissingBean to SimpleDiscoveryProperties.
Browse files Browse the repository at this point in the history
Fixes gh-759
Fixes gh-762
  • Loading branch information
shollander authored and spencergibb committed May 22, 2020
1 parent 26dae55 commit b828877
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -21,6 +21,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.cloud.client.CommonsClientAutoConfiguration;
Expand Down Expand Up @@ -57,6 +58,7 @@ public class SimpleDiscoveryClientAutoConfiguration
private SimpleDiscoveryProperties simple = new SimpleDiscoveryProperties();

@Bean
@ConditionalOnMissingBean
public SimpleDiscoveryProperties simpleDiscoveryProperties() {
simple.getLocal().setServiceId(this.serviceId);
simple.getLocal()
Expand Down

0 comments on commit b828877

Please sign in to comment.