title: How do Spring Data repositories know where your database is located?
body: <p>I have been looking at the Spring Framework guides (specifically the database access guide), and I am having trouble comprehending parts of them. In the <a href="https://spring.io/guides/gs/accessing-data-mongodb" rel="nofollow">MongoDB guide</a>, it goes over creating a model, creating a <code>MongoRepository</code>, and interacting with the data. </p>
  
  <p>But nowhere does it cover how the application knows where you MongoDB server. For example, if I am using a hosted MongoDB, how does Spring Data know what my connection string along with my credentials are? How can I configure this?</p>