title: working with two db connections in spring boot
body: <p>I want to work with two databases in Spring Boot, - some models go to db1, others to db2</p>
  
  <p>But how can i swap between them, or tell which repo belongs to which db?</p>
  
  <pre><code># db1
  spring.datasource.url=connectionString
  spring.datasource.username=db1
  spring.datasource.password=***
  spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
  
  # db2
  spring.datasource.url=connectionString
  spring.datasource.username=db2
  spring.datasource.password=***
  spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
  </code></pre>