Spring Data JPA Projections – 5 ways to return custom response

Spring-Data-JPA-ProjectionsIn this article, we are going to see Projections in Spring Data JPA in detail. We will see what are different types of projections and what are use cases to use them.Table of Contents What is Projection? If you already know about Spring Data JPA, you must be knowing that all the query methods of Repository classes will return an entity object. There [...]

Read more

Spring Boot 2 + JUnit 5 REST API Unit Testing

This article explains how to unit test REST APIs in Spring Boot 2 using JUnit 5. As we are using Spring Boot 2, we will be using Spring Framework 5. We are going to use [...]

Java 10 – Local Variable Type Inference – JEP 286

Java 10 - Local Variable Type Inference
This article provides details about a Local-Variable Type Inference introduced as a new feature in Java 10. It explains the need for Local-Variable Type Inference and how to [...]

Validation of Spring Boot RESTful Web Services with JSR 380

Introduction This article shows an example of how request bean validation is performed in Spring Boot RESTful Web Services. It uses Hibernate Validator and Bean Validation [...]

Java 9 Modules Tutorial

Java 9 Modules Tutorial
Introduction Java Platform Module System (JPMS) is one of the major feature in Java 9. This will change the way we write and publish our code/ libraries going forward. This [...]

Java 8 Stream API Tutorial

Java 8 Stream API Tutorial
This tutorial will provide you an overview of Java 8 Stream API along with example code snippets. Stream is a new API introduced in Java 8 which supports various operations to [...]

Hibernate Second Level Cache

Caching is one of the main advantage hibernate has over normal JDBC. This article briefs the caching support in hibernate. It explains Hibernate Second Level Cache in detail [...]

Spring 4 + Hibernate 5 Example

This article is an example of java application showing the integration of  Spring 4 and hibernate 5. It explains how to configure Hibernate 5 and Spring 4 along with [...]

RESTful Web Services Authentication and Authorization

This article shows an example of how to implement security in RESTful Web Services with basic authentication and authorization. It uses HTTP basic authentication and defines [...]

RESTful Web Services Integration Testing with Spring Boot

This article shows an example of Integration Testing of RESTful Web Services using Spring Boot’s test framework support. It uses @SpringBootTest annotation to load an [...]

RESTful Web Services Unit Testing with Spring Boot

This article explains how Unit Testing of RESTful Web Services is performed using Spring Boot Test framework. It uses MockMvc to provide Spring MVC infrastructure without [...]