I'm trying to set up some microservices with Spring Boot and Eureka. I'm using YAML configuration and when I start up the services, they are registered with the Eureka service. The problem I have is that the environment variables in my configuration files are not substituted but are interpreted as a string (see instanceId
).
Example application.yml:
server:
port: 0
eureka:
instance:
leaseRenewalIntervalSeconds: 10
instanceId: ${vcap.application.instance_id:${spring.application.name}:${spring.application.instance_id:${random.value}}
client:
registryFetchIntervalSeconds: 5
What I see on the Eureka app:
I've Googled the problem but I can't seem to find a solution. Does anybody known why this might happen or where I could start looking for solutions? I'm fairly new to this and I don't have a clue. Thanks.