Spring has come a long way in simplicity. Spring Boot is fantastic. Even so, there are still a gazillion ways to do the same thing. I’m always on the hunt for the simplest and this hunt took a long time. There are several tutorials and examples available, yet none of them provided this precise mix of options. I wanted to use JUnit and MongoDb templates. I did not want to define an application context. I did not want to code a repository implementation. I did not want to write any CRUD code. I did not want to configure my way into insanity.
Please check out the tutorial: MongoDB and Spring Data Queries