mongo

Spring Reactive Transaction With Mongo

Vikas Ve2ma
Introduction In this blog post we will use ReactiveMongoTransactionManager class to manage the transaction. Along with that we shall use the mongo db. Version Kotlin: 1.3.71 Spring-boot: 2.2.6.RELEASEA Java: 11 mongo db: 4.2.0-rc2-bionic Dependencies You can use Spring Initializer to initialize the project you need following dependencies - Spring Reactive Web Spring Data Reactive MongoDB Create docker-compose.yml file I use docker for running the mongo db the docker compose file looks like this -

Spring+kotlin+mongo+testcontainer

Vikas Ve2ma
Introduction In this project we shall see how to use testcontainer to test the repository created in mongodb As per their document Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container. Prerequisit Docker Create sample project Go to the spring initializer and create project with language as kotlin and dependencies required are webflux & reactive mongo db

Scala Mongo example with akka-http and akka-stream

Vikas Ve2ma
Introduction In this tutorial we shall create and CRUD web application in Scala. We will use MongoDB Scala Driver to communicate to the mongo database. It is officially supported Scala driver for MongoDB. Along with that we shall create a Rest API using akka-http module and akka-streams. Prerequisites Scala version: 2.13.1 Database: Mongo:3.4.23-xenial Other dependencies About the service/project Application should be able to do CRUD operations on the in mongodb document.