title: Use pivotal cloud foundry rabbitmq and mysql service using vcap service for spring data jpa application
body: <p>I am able to use RABBITMQ and MYSQLSERVICES which is on pivotal.While binding services I am able to get the Credentials and using that credentials in my application.properties for spring data jpa project.</p>
  
  <p>But this configuration that I am using is hard-coded in application.Properties To Make this configuration dynamically I came to know that we can use vcap services provided by pivotal.</p>
  
  <p>So want to use run-time credentials for rabbimq and mysql.</p>
  
  <p>My Code is below for reference.</p>
  
  <p>File: application.propeties</p>
  
  <pre><code>rabbitmq.host=hostname
  rabbitmq.virtual-host=vhost
  rabbitmq.username=username
  rabbitmq.password=password
  rabbit.mainqueue=queue name
  rabbit.errorqueue=erro queue name
  spring.datasource.url=jdbc:mysql://hostname:postno
  spring.datasource.driver-class-name=com.mysql.jdbc.Driver
  spring.datasource.username=root
  spring.datasource.password=root
  server.port=8000
  </code></pre>
  
  <p>The below is the repository file</p>
  
  <pre><code>package com.redistomysql.consumer.repo;
  
  import org.springframework.data.jpa.repository.JpaRepository;
  
  public interface tblemployee_personal_infoRepository extends JpaRepository&lt;tblemployee_personal_info, Long&gt; {
  
  }
  </code></pre>
  
  <p>Any help would be appreciated.</p>