Java Multithreading Tutorial With Example

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

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

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 Boot

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

Spring Boot Lazy Initialization Example

Lazy Bean’s initialization is not a new topic for Spring developers. The spring framework supports lazy-init from over 10 years. By enabling lazy loading ( lazy-init=”true” ) for a bean, we tell spring container to not to create that bean until it’s needed. So, what is new in the spring boot lazy initialization feature that …

Spring Boot

Spring @Bean – What is Spring Bean with examples

The Spring framework is a popular framework that lets you create enterprise applications conveniently. The core of the spring framework is dependency injection. Dependency injection or dependency inversion is a way in which you decouple the conventional dependencies between objects. To understand dependency injection let’s take an example of the Student and Address class. As …

CodeDelay