Spring Boot

In this article, we will learn how we can do User Authentication with Amazon Cognito in Spring Boot Application. But before that, let’s see what Amazon Cognito is. According to what’s mentioned on the AWS official website. Amazon Cognito lets you add user sign-up, sign-in, and access control to your web and mobile apps quickly…

Read More User Authentication with Amazon Cognito in Spring Boot Application

In this tutorial, you will learn to design and deploy the simple Spring Boot-based application to Docker. Overview Docker is becoming an increasingly important tool in the DevOps process.  It allows you to package an application, along with all its dependencies into a so-called container, and then run it in any environment. We will see…

Read More Deploying Spring Boot + MongoDB Application with Docker

In this tutorial, we are going to see how to create a simple Spring Boot project containing a handler that takes the name of the user as a parameter and returns a welcome message. We are then going to deploy it as a serverless application on AWS Lambda and test it. The first step is…

Read More AWS Lambda with Spring Boot – A Simple GreetMe Example

In the previous blog post, we covered the basics of how to use Keycloak with Spring boot. In this blog post, we will explore Role-based Access Control to Rest API with Keycloak. So let’s get started! Imagine we have a microservice for a Research Journal Management System that can serve users with two types of…

Read More Role-Based Access Control to REST API with Keycloak

Internationalization (i18n) is the process of making your application, services capable of delivering in different languages. In this tutorial, we will see how the Spring-Boot framework manages internationalization. Overview The internet has become global, which implies that any application or website can target millions of users around the world. Although half of the world’s population…

Read More Spring MVC Internationalization Tutorial

In this tutorial, you will learn how to use Keycloak to secure your Spring Boot Application. What is Keycloak? According to Keycloak’s  official website, It is an open-source Identity and Access Management solution aimed at modern applications and services. It makes it easy to secure applications and services with little to no code. To get…

Read More A Guide to use Keycloak with Spring Boot

In this tutorial, you will learn how to use the Spring Boot application with project Lombok. Overview No doubt Java is a wonderful language but one of the drawbacks of Java is its verbose nature. This makes it fairly complicated for everyday tasks such as composing a simple POJO object. For example, Constructing of methods…

Read More How to use Project Lombok in Spring Boot

In this tutorial, I will demonstrate how to implement the One-to-Many Mapping in your Spring Boot application that uses Hibernate/Spring Data JPA. As a database, I will use a MySQL server. To demonstrate how the one-to-many relationship works, I will implement two JPA entities: a Book and a Story. One book can have many stories…

Read More One to Many Mapping Hibernate/JPA Using Spring Boot and MySQL

In this tutorial, I will demonstrate how One to One Mapping in Hibernate/Spring Boot Data JPA works. As a database, I will use a MySQL database server. We will create two JPA entities: the Book and the Story. The Book and the Story entities have one to one relationship which means that the Book entity…

Read More One to One Mapping Hibernate/JPA Using Spring Boot and MySQL

An important property of modern web apps is Resilience. In simple words, resilience is the ability of a system’s feature to fail gracefully without impacting the entire system. In the case of web apps, we want to make sure that the entire system will not be down if a remote service (a database, API Server)…

Read More Enforcing Resilience in a Spring Boot App using Resilience4J

This tutorial is the fifth in a series on Reactive Programming in Java and Spring Framework. In this tutorial, we will develop a simple REST API using Spring Web flux. To completely understand this tutorial, you must have followed the previous one and must have knowledge on how to develop a REST Controller in a…

Read More Developing a REST API using Spring WebFlux.

In this tutorial, you will learn how to create a custom password encoder in a Spring Boot application that uses Spring Security. Table of contents Create a Spring Boot project and add database connection properties. Add a User model. Create a User repository. Implement a custom PasswordEncoder. Create a service class that implements UserDetailService Add…

Read More Custom Password Encoder in Spring Security

Multiple data source implementations are very crucial in instances where we want to secure the application from vulnerabilities such as a database failure. This will ensure that the application can still function even if part of the database went down. This tutorial will use student and course entities to demonstrate how multiple data sources can…

Read More Multiple Datasources in Spring Application

This article is the third of a series on Reactive Programming. If you have not read the previous article, I would strongly advise you to do so. In this article, we will discuss how Reactive Programming is made possible in Spring. Spring WebFlux Spring WebFlux is the Spring project that makes Reactive Programming possible in…

Read More Reactive Programming In Spring Framework