Spring Boot

Starting from Spring Security version 5.7.0-M2 the WebSecurityConfigurerAdapter is deprecated. In this blog post you will find a complete code example that demonstrates how to configure HttpSecurity object to make it support User Authentication and User Authorization. Before Below is a code example that uses WebSecurityConfigurerAdapter. @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) public class WebSecurity extends WebSecurityConfigurerAdapter{…

Read More Migrating from Deprecated WebSecurityConfigurerAdapter

In this article, we will cover the basics of Aspect-Oriented Programming (AOP). You will learn how to use AspectJ to provide different AOP advices to Spring Boot applications to support cross-cutting issues like logging, profiling, caching, and transaction management and finally we will do a practical implementation to record user operations using Spring Boot AOP.…

Read More A guide to Spring Boot AOP to Record User Operations

In this tutorial, you will learn how to configure the Spring Boot Web MVC application to support JSP(Java Server pages) and JSTL(JSP Standard Tag Library). Video Tutorial Maven Dependencies To configure your Spring Boot application to support Spring MVC, JSP and JSTL add the following maven dependencies to the pom.xml file. Spring Web The following…

Read More Spring Web MVC – Configure JSP Support

In this tutorial, we will read user data from AWS RDS with an access token. You can have a look at the following tutorials before moving ahead. Build and deploy a Serverless Spring Boot Web Application with AWS Lambda AWS Lambda with Spring Boot – A Simple GreetMe Example Amazon Cognito User Authentication in Spring…

Read More Reading user data from AWS RDS with an access token

In this article, we will learn about RabbitMQ and explore its common use-cases. We will also walk through a step-by-step guide to implement messaging using RabbitMQ in a Spring Boot Application and will see how to publish and consume messages in a queue using RabbitMQ. So, let’s begin learning! What is a RabbitMQ? RabbitMQ is…

Read More Messaging with RabbitMQ in Spring Boot Application

In this tutorial, we are going to learn that how we can use AWS Lambda to store user data in Amazon RDS. This tutorial is divided into three parts. Creating database using Amazon RDS. Creating Spring Boot Application. Testing Lambda function. We can refer to the following tutorials before going ahead. Build and deploy a…

Read More Using AWS lambda to store user data in Amazon RDS

In the previous blog post, we have covered how to grant access to certain endpoints based on the Role configured through code. As we know, Keycloak is the Identity and Access Management solution that provides out-of-the-box authentication and authorization services. One of the services includes a Fine-Grained Authorization Service. Fine-Grained Authorization Service provides businesses with…

Read More Fine-grained Authorization Services in Keycloak with Spring Boot

In this article, we will learn about the Many-to-Many relationship in JPA and its implementation in a Spring Boot Application. Let’s make a start! @ManytoMany annotation A many-to-many relationship occurs when multiple records in a table have an association with multiple records in another table. @ManytoMany annotation defines a many-valued association with many-to-many multiplicity. As per the official documentation: Every…

Read More Many-to-Many Relationship in Spring Boot Rest + JPA

In the previous tutorial, we learned that how we can do User Authentication with Amazon Cognito in Spring Boot Application. In this tutorial, we will take our previous learnings and continue with the following. Create Rest Controller to handle /login HTTP POST requests. Read username and password from the request body to authenticate with Amazon Cognito…

Read More Amazon Cognito User Authentication in Spring Boot REST

In this tutorial, you will learn to design and deploy the multi-container based Spring Boot application using Docker compose. Overview In the previous tutorial, we learned how to Dockerize a simple Spring Boot-based application. As it was a small application we have handled each container individually using multiple docker commands. But in a real-world scenario,…

Read More Spring Boot Microservices Deployment with Docker Compose

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