Spring Boot Integration Testing with Embedded MongoDB 1. Overview In this tutorial, we’ll learn how to use Flapdoodle’s embedded MongoDB solution together with Spring Boot to run MongoDB integration tests smoothly. MongoDB is a popular NoSQL document database. Thanks to the high scalability, built-in sharding and excellent community support it’s… Continue Reading spring-boot-embedded-mongodb

A Guide to Queries in Spring Data MongoDB 1. Overview This article will focus on building out different types of queries in Spring Data MongoDB. We’re going to be looking at querying documents with Query and Criteria classes, auto-generated query methods, JSON queries and QueryDSL. For the Maven setup, have… Continue Reading queries-in-spring-data-mongodb

Spring Data MongoDB – Indexes, Annotations and Converters 1. Overview This tutorial will explore some of the core features of Spring Data MongoDB – indexing, common annotations and converters. 2. Indexes ==== 2.1. @Indexed This annotation marks the field as indexed in MongoDB: @QueryEntity @Document public class User { @Indexed… Continue Reading spring-data-mongodb-index-annotations-converter

Spring Data MongoDB: Projections and Aggregations 1. Overview Spring Data MongoDB provides simple high-level abstractions to MongoDB native query language. In this article, we will explore the support for Projections and Aggregation framework. If you’re new to this topic, refer to our introductory article Introduction to Spring Data MongoDB. 2.… Continue Reading spring-data-mongodb-projections-aggregations

Auto-Generated Field for MongoDB using Spring Boot 1. Overview In this tutorial, we’re going to learn how to implement a sequential, auto-generated field for MongoDB in Spring Boot. When we’re using MongoDB as the database for a Spring Boot application, we can’t use @GeneratedValue annotation in our models as it’s… Continue Reading spring-boot-mongodb-auto-generated-field

Geospatial Support in MongoDB 1. Overview In this tutorial, we’ll explore the Geospatial support in MongoDB. We’ll discuss how to store geospatial data, geo indexing, and geospatial search. We’ll also use multiple geospatial search queries like near, geoWithin, and geoIntersects. 2. Storing Geospatial Data First, let’s see how to store… Continue Reading mongodb-geospatial-support

Spring Data MongoDB Tutorial This is a guide to Spring Data MongoDB – starting with a quick intro on how to hit the ground running in a Spring project, to more complex and useful usecases and features of the library. Spring Data MongoDB Basics + [.thrv-advanced-inline-text .tve_editable .tcb-styled-list-icon-text .tcb-no-delete .tcb-no-save]#… Continue Reading spring-data-mongodb-guide

ZonedDateTime with Spring Data MongoDB 1. Overview Spring Data MongoDB module improves readability and usability when interacting with a MongoDB database in Spring projects. In this tutorial, we’ll focus on how to handle the ZonedDateTime Java objects when reading and writing into a MongoDB database. 2. Setup To work with Spring Data… Continue Reading spring-data-mongodb-zoneddatetime