0

I am new to consul configuration. My objective is to move the properties from application.properties to a consul server.

I have tried multiple methods, but cannot seem to get it right. Is there a particular folder structure that I need to follow?

Below is my bootstrap.yml:

spring:
  application:
    name: my-service
  cloud:
    consul:
      config:
        host: xxxx
        port: xxxx
      discovery:
        instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}}

Can Consul make use of the same properties file if I place it on the server? If so, what location, with reference to consul.conf, should I place it in?

Sagar
  • 9,456
  • 6
  • 54
  • 96
Deepak Poonia
  • 71
  • 2
  • 7
  • Please see my answer [here](https://stackoverflow.com/questions/47566338/not-able-to-read-configuration-from-consul-in-spring-boot-application/47838552#47838552). – Indra Basak Dec 16 '17 at 04:57

1 Answers1

0

When do you use a client library of Consul like the spring boot, normaly this configuration file is for comunicate the micro service with the Consul Server instance and if do you like make a registration of a service.

I think that do you want make autoregistration of microservices actually Consul only support this for a dockerizate services, may this link is usefull for you:

https://github.com/gliderlabs/registrator

I hope that it help you