Spring

Spring+kotlin+mongo+testcontainer

Vikas Verma
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

JPA EntityListner example with Spring Boot 1.5.1

Vikas Verma
Introduction To audit any transaction table you can use EntityListener Annotation of the JPA. JPA provide the EntityListener annotations that attach a listener class with the entity that you want to audit. What is audit table ? Audit Tables are used to track transactions against a particular table or tables. They allow you to see an ongoing “log” for future use. There may be users and/or applications that have access to insert, update, and delete out of that table.