1
votes

I have a Spring Boot application that I am deploying to Cloud Foundry.

Intermittently the app will not load the contents of application.properties. Properties are not found in the application context, and the logging levels from the application.properties file are not respected (making debugging somewhat harder!).

Spring Boot is 1.2.5-RELEASE, and I've not seen this behaviour in other apps.

The application.properties file appears to be readable when unpacked into the running Warden container in Cloud Foundry.

Any ideas how I can debug this further?

1
Try setting the log level as an environment variable in cloud foundry page.ESala

1 Answers

0
votes

It turns out (I had a hunch) that the application developer had depended on a jar that included its own empty application.properties. It seems that when Spring is scanning the classpath to load the file, it does not order the results. Thus Spring was being affected by the arbitrary order that the filesystem returned directory listings in.

Why some DEAs always worked and some didn't, I'm not sure. I figure that when the files were getting deleted and recreated, the underlying ext4 file system was not actually deleting them, but figuring out that I was recreating something that used to exist and just repointing to an existing layout.