title: Spring get DB URL from service
body: <p>Is it possible to get a DB host URL from other service to configure in my spring.</p>
  
  <p>For example i have my configuration made in my xml in this way</p>
  
  <pre><code>&lt;bean class="org.springframework.jdbc.datasource.DriverManagerDataSource"
          id="dataSource"&gt;
          &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"&gt;&lt;/property&gt;
          &lt;property name="url" value="jdbc:mysql://49.111.231.832:3306/myDBU"&gt;&lt;/property&gt;
          &lt;property name="username" value="user"&gt;&lt;/property&gt;
          &lt;property name="password" value="user123"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>I've exposed my mysql server outside... Everything is working fine for some days..
  As mine being a dynamic ip address it changes at-least once in 3 days, so i would like to write a service wherein i'll update my ip-address in another project and wanted to consume that service to get that ip and inturn wanted to configure that dynamic ip in my above project. In this way i can avoid head ache of changing the code everytime my project and then deploy back again.</p>
  
  <p>Is it possible to do in this way or is there any other way around??</p>