The module java-cfenv-boot provides several EnvironmentPostProcessor implementations that set well known Boot properties so that Boot’s auto-configuration can kick in.
For example, the CfDataSourceEnvironmentPostProcessor sets the Boot property spring.datasource.url.
Just add a dependency on java-cfenv-boot.
The list of supported services are:
Properties that could be populated:
-
spring.datasource.url -
spring.datasource.username -
spring.datasource.password -
spring.datasource.driver-class-name
Properties that could be populated:
-
spring.rabbitmq.host -
spring.rabbitmq.username -
spring.rabbitmq.password -
spring.rabbitmq.ssl.enabled -
spring.rabbitmq.port -
spring.rabbitmq.virtualHost -
spring.rabbitmq.addresses
Properties that could be populated:
-
spring.cassandra.username -
spring.cassandra.password -
spring.cassandra.port -
spring.cassandra.contact-points
-
spring.data.redis.host -
spring.data.redis.password -
spring.data.redis.port -
spring.data.redis.ssl