springcloud-foundrypcfdev

App deployed on PCF trying to find config at localhost:8888 even when the cloud foundry provided config server is binded with app


How do we make use of Spring Cloud Services like Config Services/ Hystrix at PCF? I have one app deployed on PCF and i am trying to bind a Config server service from CF marketplace to it. But when i start the app it tries to connect localhost:8888. Any Idea what can be done?

manifest.yml

---
applications:
- name: demo
  memory: 4096M
  host: demo
  domain: apps.pcf.devfg.***.com
  services:
  - ps-config-server-pcf

Solution

  • Ensure that you have these two Libraries in your build.gradle and the bind your App to the Marketplace service

    io.pivotal.spring.cloud:spring-cloud-services-starter-config-client
    org.springframework.cloud:spring-cloud-config-server
    

    Also, remove all your local configurations from your bootstrap.yml (however PCF will over ride your values, this is a good practice to do)