Spring Boot Application Configuration Tutorial

Spring Boot Application Configuration Tutorial

In the previous Spring Boot Testing Tutorial, we have learned how to write unit, slice and integration tests for a Spring Boot application. In this tutorial, you will learn how to configure your Spring Boot application using properties and YAML files for running the application in different environments. Externalizing Spring Boot Application Configuration Any non-trivial application will have some configuration that you would like to make it configurable instead of hard-coding those values in the application code.

Continue reading »
Spring Boot Testing Tutorial

Spring Boot Testing Tutorial

In the previous Getting Started with Spring Boot tutorial, we have learned how to create a Spring Boot application and built a simple REST API. In this tutorial, you will learn how to write unit, slice and integration tests for your Spring Boot application. Testing Spring Boot applications We should write Unit Tests to verify the business logic of a particular unit(a class, a method, or a set of classes), and they shouldn’t be talking to any external services like database, queues or other webservices etc.

Continue reading »
Getting Started with Spring Boot

Getting Started with Spring Boot

Introducing Spring Boot Spring Boot is the most popular framework for building applications in the Java world. Spring Boot is an Opinionated and Convention Over Configuration based approach to building Spring framework based applications. Using Spring Boot, you can build different kinds of applications such as monolithic applications, microservices, serverless applications, Batch applications, etc. Let us take a quick look at what are the key features of Spring Boot that make it so popular.

Continue reading »
Announcing My "SpringBoot - The Missing Guide" Video Series on YouTube

Announcing My "SpringBoot - The Missing Guide" Video Series on YouTube

TLDR; I am happy to announce that I am starting the SpringBoot - The Missing Guide video series on my SivaLabs YouTube Channel. This SpringBoot - The Missing Guide video series is for those who need help understanding SpringBoot’s magic. In this series, I will explain the core concepts used in Spring and SpringBoot with practical examples. Also, I will give a deep-dive explanation of SpringBoot’s AutoConfiguration and how to customize the default configuration.

Continue reading »
My Plans for 2023

My Plans for 2023

First of all, Wish you a very happy new year and I hope this year will bring more joy and happiness into your lives. I would like to share how was 2022 for me and what my plans are for 2023. Highlights of 2022 The year 2022 is very eventful for me and lots of interesting things happened. 1. “How to Become a Software Architect” series with in28minutes and JavaBrains I collaborated with in28minutes Ranga and JavaBrains Koushik and did a “How to Become a Software Architect” series

Continue reading »
Spring Boot 3 : Error Responses using Problem Details for HTTP APIs

Spring Boot 3 : Error Responses using Problem Details for HTTP APIs

Spring Framework 6 implemented the Problem Details for HTTP APIs specification, RFC 7807. In this article we will learn how to handle exceptions in SpringBoot 3 REST API(which uses Spring Framework 6) and provide error responses using ProblemDetails API. We are going to reuse the SpringBoot 3 sample application spring-boot-jpa-crud-demo which we used for Using Java Records with Spring Boot 3 article. Assume we have the following REST API endpoints to create a bookmark and fetch a bookmark by id.

Continue reading »
Using Java Records with Spring Boot 3

Using Java Records with Spring Boot 3

Records were introduced in Java 14 as a preview feature and became a standard feature with JDK 16. Records are a concise representation of immutable data class. Prior to Records this is how we usually create an immutable class. import java.util.Objects; class Person { private final Long id; private final String name; public Person(Long id, String name) { this.id = id; this.name = name; } public Long getId() { return this.

Continue reading »
Book Review : Cloud Native Spring in Action

Book Review : Cloud Native Spring in Action

I got a chance to review the upcoming Cloud Native Spring in Action book by Thomas Vitale and here my review of the book. TLDR: If you know the basics of SpringBoot and want to master the advanced concepts and also understand what “Cloud Native” means and how to build & deploy production grade SpringBoot applications on Kubernetes then this is the book you are looking for. Longer version: There are many books on SpringBoot that are aimed towards complete beginners to intermediate skilled developers.

Continue reading »
Announcing My "SpringBoot Tips Video Series" on YouTube

Announcing My "SpringBoot Tips Video Series" on YouTube

TLDR; I am happy to announce that I am going to create “SpringBoot Tips Video Series” on my SivaLabs YouTube Channel. This “SpringBoot Tips Series” is to help people who are new to SpringBoot to learn how to use SpringBoot with a keen focus on understanding how it works behind the scenes. Longer version I have been working with SpringBoot for several years, and I have written couple of books on it too.

Continue reading »
Kubernetes - Exposing Services to outside of Cluster using Ingress

Kubernetes - Exposing Services to outside of Cluster using Ingress

In the previous article Kubernetes - Blue/Green Deployments we have learned how to release a new version of application using Blue/Green Deployments strategy. 1. Getting Started with Kubernetes 2. Kubernetes - Releasing a new version of the application using Deployment Rolling Updates 3. Kubernetes - Blue/Green Deployments 4. Kubernetes - Exposing Services to outside of Cluster using Ingress In this article, we are going to learn how to use Ingress to expose HTTP and HTTPS routes from outside the cluster to services within the cluster.

Continue reading »