spring-guides / gs-accessing-data-mongodb

Accessing Data with MongoDB :: Learn how to persist data in MongoDB.
http://spring.io/guides/gs/accessing-data-mongodb/
Apache License 2.0
139 stars 161 forks source link

Add a not on the default MongoDB connection mechanism #11

Closed odrotbohm closed 8 years ago

odrotbohm commented 9 years ago

The guide stays silent on how the repositories or the MongoTemplate are actually selecting the database to interact with. Might be just a matter of adding a small note and a link to the Boot reference docs (although they don't seem to be too precise on that particular topic, either.

Original question on StackOverflow: http://stackoverflow.com/questions/28902150/how-do-spring-repositories-know-where-your-database-is-located

gregturn commented 9 years ago

I think this section is quite precise => http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-connecting-to-mongodb. Sounds like a good idea to me.

odrotbohm commented 9 years ago

You're right. I was probably dragged away by the big code snippet.