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 »
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 »
My attempt to understand why people perceive Java as complex

My attempt to understand why people perceive Java as complex

I work as an Architect/TechLead/SeniorDeveloper depending on client engagement. And, Java is the primary programming language that I have used most of my career. In recent years I got an opportunity to work with Go, NodeJS and .Net Core technologies too. I find Java, especially with SpringBoot, a solid platform to build enterprise grade applications. Occasionally there comes a discussion of technology selection, and I noticed some people don’t prefer/like Java.

Continue reading »
Code simplicity by Abstraction vs Verbosity

Code simplicity by Abstraction vs Verbosity

Java is and has been the primary programming language I have used throughout my career. If I want to build something quick for a prototype or if I need to pick the tech stack with a tight deadline then Java is my first choice. Especially after Java 8 it becomes more and more feature rich and powerful. On top of it with frameworks like SpringBoot, Quarkus and Micronaut building enterprise grade applications becomes a breeze.

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 »
Kubernetes - Blue/Green Deployments

Kubernetes - Blue/Green Deployments

In the previous article Kubernetes - Releasing a new version of the application using Deployment Rolling Updates we have learned how to release a new version of application using Deployment Rolling Updates and how to use Readiness and Liveness probes to route traffic to only fully initialized containers. 1. Getting Started with Kubernetes 2. Kubernetes - Releasing a new version of the application using Deployment Rolling Updates 3. Kubernetes - Blue/Green Deployments 4.

Continue reading »
Kubernetes - Releasing a new version of the application using Deployment Rolling Updates

Kubernetes - Releasing a new version of the application using Deployment Rolling Updates

In the previous article Getting Started with Kubernetes we have learned how to deploy a SpringBoot application on Kubernetes(Minikube) using Deployment and Service primitives. We also looked at how to access our application using NodePort on Minikube IP address. 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:

Continue reading »
Getting Started with Kubernetes

Getting Started with Kubernetes

Docker and Kubernetes has revolutionized how we build and run the applications. In recent years containerization becomes new normal, and many organizations start using Kubernetes as Container Orchestration Platform. I was curious about Kubernetes and played with it a bit 3 years ago but I thought let’s wait and see is it going to be a real thing or just another over hyped technology. Now I see Kubernetes everywhere, especially where microservice architecture is used for their systems.

Continue reading »
Get Super Productive with Intellij File Templates

Get Super Productive with Intellij File Templates

Intellij IDEA is the most popular IDE for Java development and there are tons of features to explore and become more productive. We all know about Live Templates which can be used to expand a small expression to common code snippets. Recently I came to know about File Templates, and I realized I can put it to good use and be more productive. First let us discuss the problem I was trying to solve with File Templates.

Continue reading »