Home United States USA — software Intro to Spring Data MongoDB Reactive and How to Move It to...

Intro to Spring Data MongoDB Reactive and How to Move It to the Cloud

156
0
SHARE

In this article, see an introduction to Spring Data MongoDB Reactive and see how to move it to the cloud.
Join the DZone community and get the full member experience. In this post, we’re going to see how to configure and implement database operations using Reactive Programming through Spring Data Reactive Repositories with MongoDB to run locally and then see how to move it smoothly to the cloud through Platform.sh. Reactive programming is a programming paradigm that promotes an asynchronous, non-blocking, event-driven approach to data processing. Reactive programming involves modeling data and events as observable data streams and implementing data processing routines to react to the changes in those streams. To illustrate Reactive MongoDB, we’ll create an application to handle and store the goods of Greek mythology. In order to use Reactive MongoDB, we need to add the dependency to our pom.xml. The next step is to configure the infrastructure connection, we need to use the @EnableReactiveMongoRepositories alongside with some infrastructure setup: We’ll create a God entity and then annotated it with @Document to use it in the database operations.

Continue reading...