Introduction to Spring Data MongoDB 1. Overview This article will be a quick and practical introduction to Spring Data MongoDB. We’ll go over the basics using both the MongoTemplate as well as MongoRepository using practical examples to illustrate each operation. Further reading: Geospatial Support in MongoDB Have a look at… Continue Reading spring-data-mongodb-tutorial

Spring Data Reactive Repositories with MongoDB 1. Introduction In this tutorial, we’re going to see how to configure and implement database operations using Reactive Programming through Spring Data Reactive Repositories with MongoDB. We’ll go over the basic usages of ReactiveCrudRepository, ReactiveMongoRepository, as well as ReactiveMongoTemplate. Even though these implementations use reactive… Continue Reading spring-data-mongodb-reactive

Custom Cascading in Spring Data MongoDB 1. Overview This tutorial will continue to explore some of the core features of Spring Data MongoDB – the @DBRef annotation and life-cycle events. 2. @DBRef The mapping framework doesn’t support storing parent-child relations and embedded documents within other documents. What we can do… Continue Reading cascading-with-dbref-and-lifecycle-events-in-spring-data-mongodb

Upload and Retrieve Files Using MongoDB and Spring Boot 1. Overview In this tutorial, we’ll discuss how to upload and retrieve files using MongoDB and Spring Boot. We’ll use MongoDB BSON for small files and GridFS for the larger ones. 2. Maven Configuration First, we’ll add the spring-boot-starter-data-mongodb dependency to… Continue Reading spring-boot-mongodb-upload-file

Spring Data MongoDB Transactions 1. Overview Starting from the 4.0 release, MongoDB supports multi-document ACID transactions. And, Spring Data Lovelace now provides support for these native MongoDB transactions. In this tutorial, we’ll discuss Spring Data MongoDB support for synchronous and reactive transactions. We’ll also take a look at Spring Data TransactionTemplate for… Continue Reading spring-data-mongodb-transactions