Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consul Service Discovery - unable to configure consul host/port #49

Closed
arun0009 opened this issue Jun 25, 2015 · 2 comments
Closed

Consul Service Discovery - unable to configure consul host/port #49

arun0009 opened this issue Jun 25, 2015 · 2 comments

Comments

@arun0009
Copy link

I'm using Spring Boot Web Starter 1.2.4.RELEASE/1.3.0.M1 with Consul 1.0.0.M1 (with consul config). I am able to configure consul host/port in registry using the below configuration in bootstrap.yml

cloud:
    consul:
      config:
        host: 127.0.0.1
        port: 8500

However, when I'm trying to write a client and change consul host port using the same above configurations in bootstrap.yml it doesn't seem to be picking it up. It still looks for consul at localhost:8500

@spencergibb
Copy link
Member

For some reason, in your sample project, src/main/resources isn't on the classpath. When I added it manually, it worked properly. If you look at target/classes you'll see that *.yml isn't there. It wasn't picked up by my IDE either.

@spencergibb
Copy link
Member

in fact, your resources dir is src/resources not src/main/resources. Moving it fixes it as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants