Java cfenv example
Java CFEnv is a library for easily accessing the environment variables set when deploying an application to Cloud Foundry. It is modeled after the design of the node library node-cfenv and other -cfenv libraries in the Cloud Foundry ecosystem. The class CfEnv is the entry point to the API for accessing Cloud Foundry environment variables. In a Spring application, you can use the Spring Expression Language to invoke methods on bean of type CfEnv to set properties. CFEnv’s Boot support sets common application properties so that Java objects such as the DataSource or the RabbitConnectionFactory are created using Spring Boot autoconfiguration. The 1.0 M1 blog provides some additional background information. Dependency You can access the stable release from maven central using the coordinates <dependency> <groupId>io.pivotal.cfenv</groupId> <artifactId>java-cfenv-boot</artifactId> <version>2.1.1.RELEASE</version> ...