Spring Data with Spring Security 1. Overview Spring Security provides a good support for integration with Spring Data. While the former handles security aspects of our application, the latter provides convenient access to the database containing the application’s data. In this article, we’ll discuss how Spring Security can be integrated… Continue Reading spring-data-security

Disable Spring Data Auto Configuration 1. Introduction In this quick tutorial, we’ll explore two different ways to disable database auto-configuration in Spring Boot, which can come in handy, say, when testing. We’ll see examples for Redis, MongoDB, and Spring Data JPA. Firstly, we’ll start by looking at the annotation-based approach… Continue Reading spring-data-disable-auto-config

Spring Data with Reactive Cassandra 1. Introduction In this tutorial, we’ll learn how to use reactive data access features of Spring Data Cassandra. Particularly, this is the third article of the Spring Data Cassandra article series. In this one, we’ll expose a Cassandra database using a REST API. We can read… Continue Reading spring-data-cassandra-reactive

Difference Between save() and saveAndFlush() in Spring Data JPA 1. Overview In this short tutorial, we’re going to discuss the difference between the save() and saveAndFlush() methods in Spring Data JPA. Even though both of these methods are used for saving entities to the database, there are some fundamental differences.… Continue Reading spring-data-jpa-save-saveandflush

Customizing HTTP Endpoints in Spring Data REST 1. Introduction Spring Data REST can remove a lot of boilerplate that’s natural to REST services. In this tutorial, we’ll explore how to customize some of Spring Data REST’s HTTP binding defaults. 2. Spring Data REST Repository Fundamentals To get started, let’s create an… Continue Reading spring-data-rest-customize-http-endpoints

Persisting DDD Aggregates 1. Overview In this tutorial, we’ll explore the possibilities of persisting DDD Aggregates using different technologies. 2. Introduction to Aggregates An aggregate is a group of business objects which always need to be consistent. Therefore, we save and update aggregates as a whole inside a transaction. Aggregate… Continue Reading spring-persisting-ddd-aggregates