pivotal-cloud-foundry

No 'Access-Control-Allow-Origin' error with Spring RESTful hosted in Pivotal web services

◇◆丶佛笑我妖孽 提交于 2019-12-30 06:56:26
问题 I create a RESTful API with Spring boot and host it in Pivotal web services . Let's say the url is https://abc.cfapps.io/students and the json result will be [ {"id":1,"name":"Michael","score":8.5}, {"id":2,"name":"Naomi","score":5.6} ] Then I write an Angular client to send a request to that url: angular.module("app", []).controller("listController", function($scope, $http) { var url = 'https://abc.cfapps.io/students'; var httpRequest = new XMLHttpRequest(); httpRequest.open('GET', url, true

Pivotal Cloud Foundry Plus MySql DB

拥有回忆 提交于 2019-12-25 17:14:17
问题 I have a running web-service application on Pivotal Cloud Foundry. I have added a service to it which is MySql DB and I bind it with web service application. My Question is how to get the data source of My Sql db with Java API Plus Cloud Foundry API in (Spring-boot). Things I have tried: public class Configuration { @Configuration @Profile("cloud") static class CloudConfiguration { @Bean public DataSource dataSource() { CloudFactory cloudFactory = new CloudFactory(); Cloud cloud =

Pivotal Cloud foundry Access Service from Java App

不羁的心 提交于 2019-12-25 09:02:00
问题 How would I access credentials from a user provided service bound to a java app. For example if I create a service like so: cf cups <service instance> -p "DB_URL, DB_USERNAME, DB_PASSWORD". and bind to a java app In Java Main what would I do to access that service? ` public static void main(String[] args) throws Exception{ ?????? }` 回答1: In your Java app, you would access the VCAP_SERVICES environment variable. You can find detailed information here: http://docs.pivotal.io/pivotalcf/1-7

Unable to retrieve credentials from user-provided in vcap_services in spring boot

左心房为你撑大大i 提交于 2019-12-25 01:53:21
问题 My spring boot application is in PCF, since PCF doesnt have option to change properties file in run time, I was trying to put the values in PCF VCAP_SERVICES- user-provided credentials. I tried using @ConfigurationProperties as per tutorial provided by pivotal and i got null exception. @Data @Configuration @ConfigurationProperties("vcap.services.app-properties.credentials") public class RsTest { private String username; private String password; //getter and setter }; and my controller looks

How to setup mysql develper for PCF mySQL database to manage it

荒凉一梦 提交于 2019-12-24 18:55:39
问题 I am trying to understand PCF concepts and thinking that once i am done with creating mysql services in PCF, how i can manage that database like creating tables and maintaining that table just like we do in pur traditional environment using mySqldeveoper. I came across one service like PivotalMySQLWeb and tried but didnt liked it much. So if somehow i can get connection details of mysql service , i can use that to connect using sql developer. 回答1: The links @khalid mentioned are definitely

User provided service in cloud foundry

做~自己de王妃 提交于 2019-12-23 19:19:09
问题 I read cloud foundry docs about user provided service but not sure that I got it and how really to use it. > 1. my question is what is the use case for it? (I understand that the service is not available in the market place...) > 2.when it recommended to use it and when not ? > > 3. There is some real world example for it which I can use to create, I mean some E2E guide ? 回答1: my question is what is the use case for it? It's basically a catch-all. It's meant to handle anything that's not

How to run a spring application on cloud foundry as a one-off task using the java buildpack

99封情书 提交于 2019-12-23 10:43:23
问题 I would like to run a spring application on cloudfoundry as a one-off task using the java buildpack. Please note that my app is not a web application but a spring batch application that also uses spring cloud task. Here is my manifest: --- buildpack: https://github.com/cloudfoundry/java-buildpack.git memory: 1024M env: APPLICATION_URL: http://bignibou-server.cfapps.io/ APPLICATION_MAIL_NO_REPLY_ADDRESS: balteo@bignibou-server.cfapps.io SPRING_PROFILES_ACTIVE: cloud applications: - name:

How to run a spring application on cloud foundry as a one-off task using the java buildpack

假装没事ソ 提交于 2019-12-23 10:42:23
问题 I would like to run a spring application on cloudfoundry as a one-off task using the java buildpack. Please note that my app is not a web application but a spring batch application that also uses spring cloud task. Here is my manifest: --- buildpack: https://github.com/cloudfoundry/java-buildpack.git memory: 1024M env: APPLICATION_URL: http://bignibou-server.cfapps.io/ APPLICATION_MAIL_NO_REPLY_ADDRESS: balteo@bignibou-server.cfapps.io SPRING_PROFILES_ACTIVE: cloud applications: - name:

Specific configuration per space in manifest.yml

拈花ヽ惹草 提交于 2019-12-23 02:16:46
问题 Is there a way to set a manifest.yml property for a specific space, e.g. if I want to have 5 instances of my service when deploying to the production space but having only 1 for all other spaces? 回答1: A few options come to mind: You can override manifest.yml settings with cf cli arguments. Thus you could put an instance count of one into your manifest.yml file (actually, you don't need to do this because one is the default value but you can put any value in the file) and when you cf push that

Context routing for two different apps

夙愿已清 提交于 2019-12-22 00:27:05
问题 I deploy two different apps to CF and I want to be able to use the context path routing for those two apps e.g. lets say I've two apps that deployed and I was able to consume it with the following URL. 1. app1.domain.com 2. app2.domain.com Now I want somehow to use the context path routing of CF to be able to use this apps like following 1. something.domain.com/app1 2. something.domain.com/app2 My question are: I missing the "something", what should I put in the apps manifest to be able to