Introduction Here I am going to build a system to log online user activity in Spring Boot applications using HandlerInterceptor interface. As an application owner you may want to track your user activities, such as, which page they are accessing, from where requests were made to your application, from which pages to which pages they…

Posted in Spring Boot Spring JPA Spring REST

How To Log Online User Activity In Spring Boot Applications

Spring Data JPA provides multiple ways of selecting or fetching data from database server and one of the ways is using @NamedQuery or @NamedQueries. @NamedQuery and @NamedQueries can be created using XML configuration, external properties file or using Java based annotation config. Spring Data JPA supports both JPQL and SQL native named queries. Here I…

Posted in Spring Boot Spring JPA

Spring Data JPA @NamedQuery and @NamedQueries Example

Introduction The tutorial, GraphQL Spring MySQL CRUD example will show you how to build CRUD (Create, Read, Update, Delete) operations using GraphQL with Spring Boot framework. We will use MySQL database server for storing data and Spring Data JPA to perform database activities. My previous tutorials on GraphQL explained about how to wrap REST APIs…

Posted in GraphQL MySQL Spring Boot Spring JPA

GraphQL Spring MySQL CRUD Example

Introduction In this example we will see how to work with IN clause with WHERE condition in SQL statement in Spring Data JPA. We will use MySQL server for this example. We will fetch selected rows or multiple rows selection as well as we will delete selected rows or multiple rows deletion from the table…

Posted in MySQL Spring JPA Spring REST

Spring Data JPA IN Clause Example with WHERE Condition

Introduction In this tutorial I will show you how to work with IN, OUT and INOUT parameters in Stored Procedure using Spring Data JPA. I will also call a stored procedure having no parameter at all. I am going to use MySQL server, so there may be some limitations on MySQL server or there may…

Posted in MySQL Spring JPA

How to work with IN, OUT and INOUT Parameters in Stored Procedures using Spring Data JPA

In this tutorial I will show you how to map custom query results into DTO in Spring Data JPA. Situations may occur while you are unable to return the entity object(s) as results from your Spring Data JPA Repository and instead you need to write custom query or native query for your business requirements. So…

Posted in Spring Boot Spring JPA

How to map Custom Query Results into DTO in Spring Data JPA

Introduction In this example I will show you an example on Spring Boot jQuery AJAX CRUD. CRUD is an acronym for four operations such as Create, Read, Update and Delete. I am going to perform CRUD operations on company details. I will use here MySQL database to store company details information. I will perform each…

Posted in AJAX jQuery Spring Boot Spring JPA

Spring Boot jQuery AJAX CRUD Example

Introduction In this guide we will walk through Spring Boot Data JPA left, right, inner and cross join examples on three tables. In pas we have seen similar example on two tables but I got some requests on how to perform similar joins on three tables. Therefore I am going to show you how to…

Posted in Spring Boot Spring JPA

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

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…

Posted in Spring Boot Spring JPA

Spring Boot Data JPA CRUD Example

Introduction In this post you will see how to download file using React JS 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 I will fetch records from database and…

Posted in File Download React JS Spring Boot Spring JPA Spring REST

Download file using React and Spring Boot

Introduction In this post I will show you how to download file using Angular framework and Spring Boot. There are situations when you need to download file from server or you need to generate report from database and download it. This example may help you in such situation. I will build the Spring Boot application…

Posted in Angular File Download Spring Boot Spring JPA Spring REST

Download file using Angular and Spring Boot REST

Introduction In this post you 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…

Posted in Spring Boot Spring JPA Spring REST

HATEOAS driven REST API using Spring Boot