添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

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?