This guide will help you to understand Thread and its life cycle. We will create a few examples to create a thread using the Thread class and Runnable interface. You will learn – What is Thread in Java? – Thread Life Cycle. – How to create a thread using Thread class. – How to create …
ThreadLocal variable in JAVA with Example
This guide will help you understand about ThreadLocal variable and how to create and access the ThreadLocal variable in Java. You will learn: – What is the ThreadLocal variable? – Why do you need the ThreadLocal variable? – How to create and access a ThreadLocal variable? Few more Concurrent related articles from Codedelay ConcurrentHashMap with …
CompletableFuture in Java with Example
Java 8 introduced many important features including lambdas, stream, etc. CompletableFuture is also one of the most important features added in Java 8 which is useful in asynchronous programming. If you are not aware of asynchronous programming, it is a form of parallel programming that allows a particular code block to run separately from the …
Concurrenthashmap in Java with example
This guide will help you to understand the concept Concurrenthashmap in Java. Additionally, we will also take a look at Concurrenthashmap internal implementation and difference between Concurrenthashmap, HashMap, and HashTable. What you will Learn What is Concurrenthashmap in Java? Why is Concurrenthashmap is thread-safe? When do we need Concurrenthashmap over HashMap or HashTable? How do …
Spring Boot Rest Exception Handling Example
In this article, we focus on exception handling for a REST API. We talk about the various techniques to implement effective error handling for the Spring Boot REST APIs. Introduction to Exception handling for REST APIs In the typical Spring Boot REST-based application, we generally expose several REST endpoints for consumers to communicate with the …
Spring Boot Thymeleaf Example
Thymeleaf is a template engine which exercises the HTML or XML file, parses it and then produces web content. The primary difference between JSP and thymeleaf is JSPs compile to Servlets. However, Thymeleaf reads the template file, parses its DOM and then applies the model to it. In this tutorial, we will take a look …
Spring Boot Security – Spring REST Security Example
In the last two articles, I have demonstrated Spring Boot REST APIs through an example. Furthermore, we have also seen how to validate bean properties using hibernate validators. Particularly In this tutorial, we will see how to add secure our REST endpoints through spring security. What is Spring Security SpringSecurity It is a part of the …
Spring Validator – Spring Boot Validation Example
In the last article, we have seen how to create a simple spring boot rest example. In this tutorial, we will take a look at the spring validator and how to create a custom validator for the bean validation. To demonstrate the validators concept in spring boot, we will take a look at a few …
Spring Boot Rest Example – Restful Webservices CRUD example

REST, or REpresentational State Transfer, is an architectural style to build applications by using APIs that allow the server to communicate with clients using the basic HTTP protocols. Why REST is popular:1. It allows the separation between the client and the server.2. It doesn’t rely on a single technology or programming language.3. You can build the …
Spring boot Swagger 2 example
Developing a REST API is hard. Not only because of the effort required to design and implementation, but also the effort required for documentation so that the developers who are going to use it have a clear understanding. Swagger is a framework that helps in the documentation of APIs. Therefore, In this tutorial, we will see how …