Making queries on demand: MongoDB outbound gateway

1 Introduction In order to read data from MongoDb, Spring Integration comes with the MongoDb inbound channel adapter. This adapter uses a poller to continuously retrieve documents from the database. However, sometimes we may need to query the database on demand, based on the result…

Spring Integration MongoDB adapters with Java DSL

1 Introduction This post explains how to save and retrieve entities from a MongoDB database using Spring Integration. In order to accomplish that, we are going to configure inbound and outbound MongoDB channel adapters using the Java DSL configuration extension. As an example, we are…

Data Aggregation Spring Data MongoDB: Nested results

1 Introduction In a previous post, we built a basic example of an aggregation pipeline. Maybe you want to take a look at Data aggregation with Spring Data MongoDB and Spring Boot if you need more detail about how to create the project and configure…

Data aggregation with Spring Data MongoDB and Spring Boot

1 Introduction MongoDB aggregation framework is designed for grouping documents and transforming them into an aggregated result. The aggregation query consists in defining several stages that will be executed in a pipeline. If you are interested in more in-depth details about the framework, then mongodb…

Thymeleaf integration with Spring (Part 2)

1 Introduction This is the second part of the Thymeleaf integration with Spring tutorial. You can read the first part here, where you will learn how to configure this project. As explained at the beginning of the first part of this tutorial, the web application…

Thymeleaf integration with Spring (Part 1)

1 Introduction This article is focused on how Thymeleaf can be integrated with the Spring framework. This will let our MVC web application take advantage of Thymeleaf HTML5 template engine without losing any of the Spring features. The data layer uses Spring Data to interact…

Retry web service operations with RequestHandlerRetryAdvice

1 Introduction Sometimes when invoking a web service, we may be interested in retrying the operation in case an error occurs. When using Spring Integration, we can achieve this functionality with RequestHandlerRetryAdvice class. This class will allow us to retry the operation for a specified…