
Spring Data JPA Delete and Relationships
1. Overview In this tutorial, we’ll have a look at how deleting is done in Spring Data JPA. 2. Sample Entity As we know from the Spring […]
1. Overview In this tutorial, we’ll have a look at how deleting is done in Spring Data JPA. 2. Sample Entity As we know from the Spring […]
1. Introduction For simple queries, it’s easy to derive what the query should be just by looking at the corresponding method name in our code. In […]
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 […]
1. Introduction In this short tutorial, we’ll learn how to create update queries with the Spring Data JPA @Query annotation. We’ll achieve this by using the @Modifying annotation. First, we’ll […]
1. Overview Spring Data provides many ways to define a query that we can execute. One of these is the @Query annotation. In this tutorial, we’ll demonstrate how […]
1. Overview This tutorial will focus on introducing Spring Data JPA into a Spring project, and fully configuring the persistence layer. For a step by step introduction […]
1. Overview This tutorial shows how to set up Spring with JPA, using Hibernate as a persistence provider. For a step-by-step introduction to setting up the […]
1. Overview Spring Boot makes it really easy to manage our database changes in an easy way. If we leave the default configuration, it’ll search […]
1. Overview Spring JDBC and JPA provide abstractions over native JDBC APIs, allowing developers to do away with native SQL queries. However, we often need to see those auto-generated […]
1. Overview This article will focus on simplifying the DAO layer by using a single, generified Data Access Object for all entities in the system, which will […]
1. Overview This article will show how to implement the DAO with Spring and JPA. For the core JPA configuration, see the article about JPA with Spring. 2. […]
1. Overview This article will show how to implement the DAO with Spring and Hibernate. For the core Hibernate configuration, check out the previous Hibernate 5 with […]
1. Overview Persistence providers like Hibernate make use of persistence context to manage the entity lifecycle in an application. In this tutorial, we’ll start with […]
1. Overview Spring’s @Transactional annotation provides a nice declarative API to mark transactional boundaries. Behind the scenes, an aspect takes care of creating and maintaining transactions as […]
1. Introduction In this tutorial, we’ll cover the @Transactional annotation, as well as its isolation and propagation settings. 2. What Is @Transactional? We can use @Transactional to wrap a method in a database transaction. […]
1. Overview This tutorial will discuss the right way to configure Spring Transactions, how to use the @Transactional annotation, and common pitfalls. For a more in-depth discussion on […]
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, […]
1. Overview In this article, we’ll discuss how to bootstrap Hibernate 5 with Spring, using both Java and XML configuration. This article focuses on Spring MVC. […]
1. Introduction In this tutorial, we’ll explore several libraries for reading an HTTP response body as a string in Java. Since the first versions, Java […]
1. Overview In this tutorial, we’re going to learn how to implement efficient RestTemplate request/response logging. This is especially useful to debug exchange between two servers. Unfortunately, […]