For Spring Cloud Stream samples, see the spring-cloud-stream-samples repository on GitHub.
On CloudFoundry, services are usually exposed through a special environment variable called VCAP_SERVICES.
When configuring your binder connections, you can use the values from an environment variable as explained on the dataflow Cloud Foundry Server docs.