Spring JPA

Spring Boot Data JPA CRUD Example

Introduction We will see here Spring Boot Data JPA CRUD example. CRUD means Create Read Update and Delete operations. We will use in-memory h2 database in order to perform CRUD operations in database. We have other example on Spring Data JPA CRUD example but the application does not use Spring Boot. In this example, we […]

Download file using React and Spring Boot

Introduction In this post we will see how to download file using React and Spring Boot. There are situations where you need to download file from server or you need to generate report from database and download it. This example may help you in that situation. Here we will fetch records from database and download […]

Download file using Angular and Spring Boot

Introduction In this post we will see how to download file using Angular and Spring Boot. There are situations where you need to download file from server or you need to generate report from database and download it. This example may help you in that situation. Here we will fetch records from database and download […]

HATEOAS driven REST API using Spring Boot

Introduction In this post we will see an example on HATEOAS driven REST API using Spring Boot. An approach that breaks down the principal elements of a REST approach into three steps are resources, http verbs and hypermedia controls: Without using any mechanism of the web, HTTP is used as a transport system for remote […]

Integrate H2 In-memory Database with Spring Boot 2.1 and build using Gradle

This tutorial will show you how to integrate in-memory H2 database with Spring Boot 2.1 and build using Gradle tool. We will see here simple JPA example to understand how it works. What is an in-memory database? An in memory database is created when an application starts up and destroyed when the application is stopped. […]

Spring Boot Data JPA Left, Right, Inner and Cross Join Examples

Introduction This tutorial will show you Spring Boot Data JPA Left, Right, Inner and Cross Join Examples. We will tell you here how to use this example in Spring Boot application, where we will use Spring Data JPA Repository to query our database tables. We will use here custom query using @Query annotation to fetch […]

Spring Data JPA Specification Criteria Query with IN Clause Example

Introduction Spring Data JPA Specification Criteria Query generally used for search functionality on a page where users want to search by giving some inputs. In this example we will use how to use collection or list of input parameters into CriteriaQuery to fetch data from database. Problem and Solution Suppose you have a web page […]

File download example using Spring REST Controller

Introduction File download example using Spring REST Controller will show you how to download a file from any client (browser or any client) and Spring REST service is used as a server side technology for downloading the file. The file may be any type, i.e., such as excel, text, word, pdf etc. Here we will […]

Spring Data JPA Entity Auditing using EntityListeners

Introduction The tutorial Spring Data JPA Entity Auditing using EntityListeners will show you how you persist the audit log using JPA’s built-in functionality. Spring Data  JPA provides sophisticated support to transparently keep track of who created or changed an entity and at what time. To benefit from this functionality you have to equip your entity classes […]

Hibernate UserType Example using Spring Data JPA

In Hibernate UserType Example using Spring Data JPA we will see how Hibernate allows us to implement and use custom types when built-in types do not satisfy an application’s requirements, or when we want to change the default behavior of a built-in type. As you will see, you can easily implement a custom-type class and […]

Scroll to top