By design, the ServiceInfo
classes in Spring Cloud Connectors carry just enough information to create the connection beans necessary for an app to consume the service resources. Connectors was designed to be platform-neutral, and fields like plan
, label
, and tags
that are available on Cloud Foundry are not captured because they might not be available on other platforms (e.g. Heroku).
To add the plan
information to a ServiceInfo
, you'd need to write your own ServiceInfo
class that includes a field for the value, then write a CloudFoundryServiceInfoCreator
to populate the value from the VCAP_SERVICES
data that the framework provides as a Map
. See the project documentation for more information on creating such an extension.
Another (likely easier) option is to use the newer java-cfenv
project instead of Spring Cloud Connectors. java-cfenv
supports Cloud Foundry only, and gives access to the full set of information in VCAP_SERVICES
. See the project documentation for an example of how you can use this library.