简体   繁体   English

春季启动应用程序在Cloud Foundry中的应用程序级别服务绑定

[英]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. 我需要将我的spring boot应用程序(在PCF上运行)与其他微服务的mysql服务实例绑定。 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 我相信应用程序级别的服务绑定可以帮助我,但是我在这里仅获得了一个春季云流示例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 . 如果有人可以帮助我在pcf中为Spring Boot应用程序找到应用程序特定服务绑定的示例,那就太好了。

Thanks, Nilanjan 谢谢,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"). PCF服务名称-您在PCF中的服务的实际名称(例如“ foo”)。
  2. The name of your application/microservice ( application is synonymous to microservice in this context) 您的应用程序/微服务的名称( 应用程序是同义的microService在这种情况下)

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: 因此,如果您的微服务名称是“ bar”,而PCF服务名称是“ foo”,那么将此类服务绑定到您的应用程序的指令将是:

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. 希望这会有所帮助,但是如果仍然不清楚或您需要更多信息,请告知我们。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将MYSQL添加到Cloud Foundry并将其用作服务 - Adding MYSQL to Cloud Foundry and using it as a service 在Cloud Foundry中将Java应用程序绑定到MySQL - Binding Java application to MySQL in Cloud Foundry Spring Boot应用程序无法连接到Google Cloud SQL - Spring Boot application cannot connect to Google Cloud SQL 如何通过 MySQL Workbench 或 CLI 或 MySQLWeb 数据库管理应用程序连接到 Pivotal Cloud Foundry (PCF) 上的 MySQL 服务? - How do I connect to my MySQL service on Pivotal Cloud Foundry (PCF) via MySQL Workbench or CLI or MySQLWeb Database Management App? Google APP Engine 和云 sql :: 无法在 Google 云 sql(我的 sql)中连接 Spring boot 应用程序 - Google APP Engine and cloud sql :: Unable to connect Spring boot app in Google cloud sql (my sql) Google Cloud Platform - Cloud SQL 上 MySQL 的 Spring Boot 应用程序连接问题 - Google Cloud Platform - Spring Boot application connection issues with MySQL on Cloud SQL 错误310:暂存部署失败-Cloud Foundry中的Grails应用 - Error 310: Staging failed deploying - Grails app in Cloud Foundry Bluemix-将Mobilefirst容器绑定到Cloud Foundry-App - Bluemix- Bind Mobilefirst Container to Cloud Foundry-App 无法从Cloud Foundry应用连接到MySQL数据库 - Cannot connect to the mySQL database from cloud foundry app 无法使用 Spring-Boot 应用程序从 GKE 连接到 Cloud SQL (MySQL) - Not able to connect to Cloud SQL (MySQL) from GKE using a Spring-Boot application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM