Spring Boot

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 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

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

In this tutorial, the reader will learn how to deploy a Spring Boot REST app to Tomcat 10. According to Apache, the Jakarta EE platform is the evolution of the Java EE platform. Tomcat 10 and later implement specifications developed as part of Jakarta EE. Tomcat 9 and earlier implement specifications developed as part of…

Read More Deploy a Spring Boot REST App as a WAR to Tomcat 10

In this tutorial on Spring Cloud you will learn how to create your own Spring Cloud Config Server and also, how to configure a Spring Boot Application to be a Spring Cloud Config Client. Spring Cloud Config Server Spring Cloud Config Server is a Spring Boot application. So to create our own Spring Cloud Config…

Read More Spring Cloud Config Server and Config Client

In this tutorial, you will learn how to start your Spring Boot application on a random port number. This is very helpful when you need to start multiple instances of the same Spring Boot application and then balance HTTP requests between the running instances. If you are interested to learn how to balance HTTP requests…

Read More Start Spring Boot App on a Random Port Number

In this tutorial, you will learn how to start your Spring Boot Web application on a different port number. By default, if no port number is configured, our Spring Boot Web application will start on port number 8080. To configure a different port number, you will need to update an application.properties file with the following…

Read More Start Spring Boot App on a Different Port Number

In this tutorial, you will learn how to configure your Spring Boot application to log messages to a file. Specify File Path To make your application log messages to a file, you will need to configure a couple of new properties in the application.properties file. logging.file.path=/path/to/a/file logging.file.name=log.txt You might also need to enable a specific logging…

Read More Log to File in Spring Boot

In this short tutorial, I am going to share with you how to switch your Spring Boot app, at runtime, to use a different logging level. Set Logging Level for a Package in Your App Let’s assume we have a Spring Boot Web Application with the following method in a Rest Controller class. @RestController @RequestMapping(“/users”)…

Read More Switch Logging Level in Spring Boot at Runtime

Free Video Lessons

Enter your email and stay on top of things,

Subscribe!