The Exists Query in Spring Data 1. Introduction In many data-centric applications, there might be situations where we need to check whether a particular object already exists. In this tutorial, we’ll discuss several ways to achieve precisely that using Spring Data and JPA. 2. Sample Entity To set the stage… Continue Reading spring-data-exists-query

Spring Data – CrudRepository save() Method 1. Overview CrudRepository is a Spring Data interface for generic CRUD operations on a repository of a specific type. It provides several methods out of the box for interacting with a database. In this tutorial, we’ll explain how and when to use the CrudRepository… Continue Reading spring-data-crud-repository-save

DynamoDB in a Spring Boot Application Using Spring Data 1. Overview In this article, we’ll explore the basics of integrating DynamoDB into a Spring Boot Application with a hands-on, practical example project. We’ll demonstrate how to configure an application to use a local DynamoDB instance using Spring Data. We’ll also… Continue Reading spring-data-dynamodb

Integrating Spring Boot with HSQLDB 1. Overview Spring Boot makes it really easy to work with different database systems, without the hassle of manual dependency management. More specifically, Spring Data JPA starter provides all the functionality required for seamless integration with several DataSource implementations. * * In this tutorial, we’ll… Continue Reading spring-boot-hsqldb

Spring Data MongoDB Tailable Cursors 1. Introduction In this tutorial, we’re going to discuss how to use MongoDB as an infinite data stream by utilizing tailable cursors with Spring Data MongoDB. 2. Tailable Cursors When we execute a query, the database driver opens a cursor to supply the matching documents.… Continue Reading spring-data-mongodb-tailable-cursors

Configuring a DataSource Programmatically in Spring Boot 1. Overview Spring Boot uses an opinionated algorithm to scan for and configure a DataSource. This allows us to easily get a fully-configured DataSource implementation by default. In addition, Spring Boot automatically configures a lightning-fast connection pool — either HikariCP, Apache Tomcat, or Commons DBCP, in… Continue Reading spring-boot-configure-data-source-programmatic

Setting the MySQL JDBC Timezone Using Spring Boot Configuration 1. Overview Sometimes, when we’re storing dates in MySQL, we realize that the date from the database is different from our system or JVM. Other times, we just need to run our app with another timezone. In this tutorial, we’re going… Continue Reading mysql-jdbc-timezone-spring-boot