Re: CF Environment Variable Interpolation

Scott Frederick <scottyfred@...>


Diego migration should not have affected this Spring Boot behavior. Here
are a few things to look at to diagnose the problem.

Use the cf CLI to view the environment for your application - e.g. “cf env
my-app”. This should show a VCAP_SERVICES environment variable containing
the credentials and connection info for all services bound to the app. If
the “dashboardService” isn’t in VCAP_SERVICES, then the app likely became
unbound during the migration. Re-binding should correct the issue.

If the “dashboardService” is in VCAP_SERVICES, then you can look at how
Spring Boot is processing the environment variable. Add Actuators to your
if it isn’t there already, then access the “/env” endpoint on the app with
a browser or curl. There should be a property source named “vcap” in the
JSON returned from “/env” containing all the properties you are looking

If the “dashboardService” is in VCAP_SERVICES but isn’t showing property in
the Actuator “/env” endpoint, then reply with what you do see.


On Tue, Feb 7, 2017 at 8:25 AM, Chip Childers <cchilders(a)>

Have you confirmed that your application is still bound to the relevant
service instance?

On Mon, Feb 6, 2017 at 10:43 AM Olga Reva <reva.olga(a)> wrote:

Since migration to Diego, our Spring Boot Applications cannot access
properties defined in files like the following: = ${

I.e. app try to connect to http://localhost:8081 instead of using of
predefined variables

How to change configs to access variables using
Can anybody help me?
Chip Childers
CTO, Cloud Foundry Foundation <(267)%20250-0815>

Join { to automatically receive all group messages.