When deploying microservice (with spring-actuator) to CloudFoundry with @EnableDiscoveryClient with the following configuration in application.yml:
spring:
profiles: cloud
eureka:
instance:
instanceId: ${spring.application.name}:${spring.application.instance_id}
Getting the following error:
Could not resolve placeholder 'spring.application.instance_id' in string value "${spring.application.name}:${spring.application.instance_id}"...
Which means that the spring.application.instance_id is not populated for some reasons by CF.
Any idea why this could happen?
In spring-cloud-netflix.adoc, in spring-cloud and in spring-cloud-consul we have this statement:
In Cloudfoundry the spring.application.instance_id will be populated automatically in a Spring Boot Actuator application....
Does that mean that the spring.application.instance_id should be replaced with vcap.application.application_id in that statement?