Tag Archives: Spring Boot

Spring Boot — convention-over-configuration framework for building Spring-based Java applications

Resilience4j Circuit Breaker in Spring Boot: The Modern Replacement for Hystrix

Netflix Hystrix is in maintenance mode and has been since 2018. The modern replacement is Resilience4j — a lightweight, modular fault-tolerance library with first-class Spring Boot integration. In this guide you will implement all five core patterns — Circuit Breaker, Retry, Rate Limiter, Bulkhead, and TimeLimiter — in Spring Boot 3.x, with working configuration, the Hystrix-to-Resilience4j property mapping I wish I’d had during my own migration, and the three bugs that bite almost every team on day one.

Continue reading Resilience4j Circuit Breaker in Spring Boot: The Modern Replacement for Hystrix

Mastering Cache Control with ETag in Spring Boot RESTful APIs

An ETag (Entity Tag) is a short fingerprint — typically an MD5 or SHA hash of a resource’s content — that a REST API includes in every response. On the next request, the client sends the ETag back in a If-None-Match header. If the resource has not changed, the server replies with 304 Not Modified and an empty body, saving bandwidth and time. In this guide you will learn how ETags work, implement them from scratch in a Spring Boot REST API, and apply conditional updates to prevent lost updates in concurrent systems.

Continue reading Mastering Cache Control with ETag in Spring Boot RESTful APIs

Secure Your Jersey REST APIs – Complete Authentication & Authorization Guide

Exposing a REST endpoint is only half the job — you also need to control who can call it and what they are allowed to do. Jersey, the reference implementation of Jakarta RESTful Web Services (JAX-RS), provides a clean extension point through ContainerRequestFilter that lets you intercept every request before it reaches your resource class. In this guide you will implement HTTP Basic authentication, JWT Bearer-token validation, and role-based authorization step by step, using plain Jersey and then the Spring Boot integration.

Continue reading Secure Your Jersey REST APIs – Complete Authentication & Authorization Guide

Mastering Maven: How to Create Your Own Custom Archetypes

Every time you run mvn archetype:generate, Maven reads a blueprint called an archetype to scaffold your project structure. The built-in archetypes cover plain Java and simple web apps, but when your team has its own folder conventions, preferred dependencies, or boilerplate code, you need a custom archetype. In this guide you will build a complete custom Maven archetype from scratch, install it to your local repository, generate a new project from it, and optionally deploy it to a team-shared repository so your whole organisation can use it in one command.

Continue reading Mastering Maven: How to Create Your Own Custom Archetypes

JMS Deep Dive: A Practical Guide to Asynchronous Messaging in Java

The Java Message Service (JMS) API is the standard Java EE / Jakarta EE API for sending, receiving, and reading messages in an asynchronous, loosely coupled way. Rather than having Service A call Service B directly, JMS lets A drop a message onto a queue or topic and carry on. Service B picks it up whenever it is ready. In this guide you will learn the key JMS concepts, study both queue (point-to-point) and topic (publish-subscribe) messaging models, and walk through a fully working Java example using Apache ActiveMQ — the most widely deployed open-source JMS broker.

Continue reading JMS Deep Dive: A Practical Guide to Asynchronous Messaging in Java

Complete Guide to Logback RollingFileAppender

Without log rotation, a long-running Java application will eventually fill your disk with a single ever-growing log file. Logback’s RollingFileAppender solves this by automatically creating a new log file when a threshold is crossed and optionally compressing or deleting old files. In this guide you will learn every rolling policy Logback provides, understand each configuration attribute, and walk away with production-ready logback.xml examples you can drop into your Spring Boot or plain Java application today.

Continue reading Complete Guide to Logback RollingFileAppender

Building a REST API with Spring Boot: Complete Beginner's Guide

Spring Boot strips away the configuration ceremony that used to make Spring applications time-consuming to set up. You add a dependency, annotate a class, and a production-grade REST endpoint is running in seconds. This guide builds a complete, working REST API from a blank project to a tested, structured service – explaining every decision along the way.

By the end you will have a runnable Spring Boot application with GET, POST, PUT, and DELETE endpoints, proper HTTP status codes, global exception handling, validation, and a structure that scales to a real project.

Continue reading Building a REST API with Spring Boot: Complete Beginner's Guide