简体   繁体   中英

application level service bindings in cloud foundry for a spring boot app

I have a requirement of binding my spring boot app (which is running on PCF) with mysql service instance of a different microservice. I believe application level service bindings can help me but I get only a spring cloud stream example here https://docs.spring.io/spring-cloud-dataflow-admin-cloudfoundry/docs/current-SNAPSHOT/reference/html/getting-started-service-binding-at-application-level.html

It would be great if somebody can help me in finding an example of application specifc service binding in pcf for a spring boot app .

Thanks, Nilanjan

Nilanjan

As pointed out in the document you've provided you should look at this in two parts

  1. The PCF service name - the actual name of your service in PCF (eg, "foo").
  2. The name of your application/microservice ( application is synonymous to microservice in this context)

So, if your microservice name is "bar" and PCF service name is "foo", then the directive for binding such service to your application would be:

dataflow:>stream deploy --name myFlow --properties "deployer.bar.cloudfoundry.services=foo"

Hope this helps, but let us know if it is still unclear or you need some more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM