Circuit Breaker in Spring Boot Application
Circuit Breaker in Spring Boot Application
Image from Pixabay By Jürgen Diermaier

In this post, I will show how we can use the Circuit Breaker pattern in a Spring Boot Application. When I say Circuit Breaker pattern, it is an architectural pattern. Netflix had published a library Hysterix for handling circuit breakers. As part of this post, I will show how we can use a circuit breaker pattern using the resilence4j library in a Spring Boot Application.

In other news, I recently released my book Simplifying Spring Security. If you are interested to learn about Spring Security, you can buy it here.

What is Circuit Breaker?

The concept of Circuit Breaker comes from Electrical Engineering. In…

Step By Step Spring Batch Tutorial
Step By Step Spring Batch Tutorial

In this post, I want to show how you can use Spring Batch. This is a step by step Spring Batch Tutorial.

In enterprise applications, batch processing is common. But with data becoming more prevalent on the internet, it has also become important how we process this data. There are multiple solutions available. Apache Storm or Apache Spark helps with processing and transforming the data in the required format. In this post, we will be looking at Spring Batch more closely.

What is Spring Batch?

Spring Batch is a lightweight framework designed to facilitate batch processing. It allows developers to create batch applications. …

Finally, the book is here. Simplifying Spring Security.

Why I wrote this book?

As part of writing my blog, I also follow few communities on Facebook. Most of these communities are related to Spring Framework and Spring Boot. There are a number of users who ask questions related to Spring Security. Hence, I wondered why not write a book about it.

Also as a developer, when I’m writing a Spring Boot application, I often use Spring Security. Accordingly, I always felt like I was using this mysterious library that solves my authentication problems. …

Finally, the book is here. Simplifying Spring Security.

Why I wrote this book?

As part of writing this blog, I also follow few communities on Facebook. Most of these communities are related to Spring Framework and Spring Boot. The number of users asks questions related to Spring Security. Hence, I wondered why not write a book about it.

Also as a developer, when I’m writing a Spring Boot application, I often use Spring Security. Accordingly, I always felt like I was using this mysterious library that solves my authentication problems. I wanted to understand the fundamentals and how Spring Security dealt with authentication and authorization.

Simplifying Spring Security
Simplifying Spring Security

What do I cover?

Spring Boot CRUD Application MongoDB
Spring Boot CRUD Application MongoDB

Introduction

In this post, I will show how we can use Spring Boot to build a simple CRUD REST application example with MongoDB. I know your first question will be what is MongoDB?

What is MongoDB?

MongoDB is a NoSQL document database. In this database, records are documents which behave a lot like JSON objects. So it is mostly key-value pair.

The key advantages of using MongoDB as a database are:

  • MongoDB is a schema less document database. One collection holds different documents.
  • Structure of a single object is clear.
  • No complex joins
  • Deep query ability.
  • Easy to scale out

Here are a few…

In the last few months, I have received a few requests about Spring Boot Interview Questions. In this post, I will cover the top 21 Spring Boot Interview Questions. Additionally, I will also cover some Microservice architecture related questions.

I have divided these Spring Boot interview questions into three categories — for a novice, for intermediate, and for an experienced developer. So if you don’t have any experience with Spring Boot, novice questions will help you.

Spring Boot Interview Questions for Novice Developers

1. What is Spring Boot and How is it useful in Web Application Development?

Spring Boot is a framework built on top of Spring Framework for rapid application development. Similarly, Ruby on Rails, Django with Python web frameworks…

Introduction

Spring 5 introduced a new reactive web client called WebClient. In this post, I will show when and how we can use Spring WebClient vs RestTemplate. I will also describe what features WebClient offers.

What is RestTemplate?

RestTemplate is a central Spring class that allows HTTP access from the client-side. RestTemplate offers POST, GET, PUT, DELETE, HEAD, and OPTIONS HTTP methods. The simple use case of RestTemplate is to consume Restful web services.

You can create a bean that provides the instance of RestTemplate. You can then @autowire this bean in any class where you plan to call REST services. …

In this post, I will cover the complete guide to using docker compose. You can use it to build a multi-container application. But what is a docker compose and why one should use it?

What is Docker Compose?

If you don’t know what a docker is, you can read about that here. If you have an application that is running on a docker and if that application is using multiple other services like database, web-server, load balancer, then you can write multiple docker files and run multiple containers. It can be cumbersome to manage these files. …

In this post, I will describe the 7 AWS Services a developer should know about. As a developer, it is important to understand when and how to use these services.

Even though moving the infrastructure to the cloud movement began in the last decade, it has picked up the speed in the last 5–6 years. As always, Amazon had been leading on this front. Now the most companies use cloud whether AWS, Google, or Microsoft Azure services for cloud infrastructure.

Amazon Web Services offer a number of services, but we will look at the 7 AWS services only. These services…

In this post, I will show how to use Rest Template to consume RESTful API secured with Basic Authentication. As part of this post, I will show how to build a REST API that is secured with Basic Authentication.

Overview

Basic Authentication is one of the mechanisms that you can use to secure your REST API. In my previous post, I showed how to secure REST API with Json Web Token.

Secure a REST API with Basic Authentication

Configure a REST API

Firstly, we will show a simple REST API to create users or retrieve users from the database. Then, we will secure this REST API with a Basic Authentication mechanism. …

Yogesh Mali

Software Developer, Writer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store