Writing

Notes from building things that don't break.

Practical patterns, real code, and the occasional mistake worth writing down.

019 min read

Spring Boot · Error Handling

The Error Handling Setup I Use in Every Production API

A reusable exception-handling layer that turns stack traces into consistent, client-safe error responses with trace IDs.

Spring BootJavaAPI Design
027 min read

REST · API Design

Stop Returning 200 OK for Everything

The difference between a technical error and a business error, and why your HTTP status code is part of your API contract.

RESTHTTPAPI Design
036 min read

Observability · Tracing

Why Every Microservice Request Needs a Correlation ID

How a single header turns fifty thousand scattered log lines into one readable request timeline.

Spring BootLoggingMDC
047 min read

Spring Boot · Logging

Production Logging: 7 Things I Never Log

Passwords, tokens, and PII have a way of ending up in log files. Here is what stays out and what to log instead.

LoggingSecurity
058 min read

Spring Boot · Integration

Your HTTP Client Needs More Than RestClient

Timeouts, connection pooling, and correlation-id propagation are not optional extras for a service-to-service client.

Spring BootHTTP
069 min read

Resilience · Distributed Systems

What Happens When a Service You Depend On Goes Down?

Timeouts, retries, and circuit breakers are three different failures wearing the same trench coat. Here is when to use each.

Resilience4jSystem Design
078 min read

Spring Boot · Payments

Idempotency: How I Prevent Duplicate Requests

A network retry should never mean a customer gets charged twice. The fix is an idempotency key and a unique constraint.

IdempotencyRedis
088 min read

Spring Boot · Data

@Transactional Won't Save You

A database rollback cannot undo a Kafka message or a payment API call. The outbox pattern is how you close that gap.

TransactionsPostgreSQL
099 min read

Logs · Metrics · Traces

Observability: Finding Why a Request Took 5 Seconds

Logs tell you something happened. Traces tell you where the time went. Building both into one Spring Boot service.

OpenTelemetryMicrometer
108 min read

Developer Tooling

I Built a CLI That Generates My Spring Boot Boilerplate

Nine articles of reusable patterns are only reusable if copying them takes one command instead of nine tabs.

CLIAutomation