Tagged articles
15 articles
Page 1 of 1
Architect's Guide
Architect's Guide
Sep 2, 2025 · Backend Development

Spring Boot API Mastery: Validation, Global Exceptions, Responses and Security

This comprehensive guide walks you through building robust Spring Boot backend APIs, covering environment setup, parameter validation with Validator and groups, custom validation, global exception handling, unified response structures, optional response wrapping, API version control via path and header, and essential security measures such as token authentication, timestamp checks, URL signing, replay protection, and HTTPS usage.

API ValidationAPI VersioningSpring Boot
0 likes · 27 min read
Spring Boot API Mastery: Validation, Global Exceptions, Responses and Security
Architect's Guide
Architect's Guide
Jul 19, 2025 · Backend Development

Mastering Unified Login, Interceptors, and Exception Handling in Spring Boot

This tutorial walks through implementing unified user login verification, request interception, global exception handling, and a consistent response format in Spring Boot using AOP, HandlerInterceptor, @ControllerAdvice, and ResponseBodyAdvice, complete with code examples and architectural explanations.

Spring BootUnified responseaop
0 likes · 20 min read
Mastering Unified Login, Interceptors, and Exception Handling in Spring Boot
Architect's Guide
Architect's Guide
Jul 1, 2025 · Backend Development

Spring Boot API Validation, Global Exception Handling & Secure Versioning

This guide walks through building robust Spring Boot backend APIs by detailing request parameter validation with @Validator, implementing global exception handling, standardizing unified response structures, applying custom annotations for response control, managing API versioning via path and header strategies, and enhancing security with token authentication, timestamps, signatures, and HTTPS.

API SecurityAPI ValidationResponse Wrapping
0 likes · 24 min read
Spring Boot API Validation, Global Exception Handling & Secure Versioning
Architect
Architect
Nov 25, 2024 · Backend Development

How to Refactor Bloated Spring Controllers into Clean, Maintainable Code

The article examines common pain points of oversized Spring controllers, contrasts a verbose implementation with a concise version that leverages @Valid and assertion utilities, and provides step‑by‑step guidance on validation annotations, global exception handling, and best‑practice refactoring to improve readability and maintainability.

@ValidBackendController Refactoring
0 likes · 11 min read
How to Refactor Bloated Spring Controllers into Clean, Maintainable Code
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 17, 2023 · Backend Development

Understanding Jackson vs Fastjson Serialization of Circular References and Global Exception Handling in Spring Boot

The article examines how Spring Boot handles circular reference serialization with Jackson and Fastjson, demonstrates the role of @ControllerAdvice for global exception capture, explains why Jackson may emit both 200 and 500 responses, and provides practical solutions using annotations and configuration.

BackendJacksonSpring Boot
0 likes · 18 min read
Understanding Jackson vs Fastjson Serialization of Circular References and Global Exception Handling in Spring Boot
Java Backend Technology
Java Backend Technology
Feb 17, 2023 · Backend Development

Master Global Exception Handling in Spring Boot: A Complete Guide

This article explains how to create a unified response class, define custom exception and error‑enum types, and implement a global exception handler in Spring Boot, enabling clean error handling, reduced boilerplate, and flexible business‑specific extensions.

AjaxResultBackend DevelopmentError Enum
0 likes · 6 min read
Master Global Exception Handling in Spring Boot: A Complete Guide
Programmer DD
Programmer DD
Sep 14, 2022 · Backend Development

Mastering Global Exception Handling in Spring Boot: A Step-by-Step Guide

This article demonstrates how to implement unified global exception handling in a Spring Boot application by defining custom exceptions, creating a @RestControllerAdvice with specific @ExceptionHandler methods, and wiring sample controller endpoints to showcase both system and custom error responses.

JavaREST APISpring Boot
0 likes · 6 min read
Mastering Global Exception Handling in Spring Boot: A Step-by-Step Guide
Top Architect
Top Architect
May 8, 2021 · Backend Development

Implementing a Global Exception Handler in Spring Boot

This article explains how to replace repetitive try‑catch blocks in Spring Boot applications with a unified global exception handling solution by defining a standard AjaxResult response, a custom BusinessException, an error enumeration, and a @RestControllerAdvice handler, enabling clean, extensible error management.

Backend DevelopmentError HandlingJava
0 likes · 5 min read
Implementing a Global Exception Handler in Spring Boot
Java Backend Technology
Java Backend Technology
Apr 29, 2021 · Backend Development

Master SpringBoot Global Exception Handling: From Setup to Testing

This article explains how to set up SpringBoot 1.5.17 with Maven, define custom error interfaces, enums, and exception classes, implement a global @ControllerAdvice handler, and verify the behavior through Postman tests for various CRUD endpoints, demonstrating unified error responses.

ControllerAdviceError ResponseJava
0 likes · 15 min read
Master SpringBoot Global Exception Handling: From Setup to Testing
Java Backend Technology
Java Backend Technology
Mar 20, 2021 · Backend Development

Master Global Exception Handling in Spring Boot: Unified Error Responses

This article explains how to replace repetitive try‑catch blocks in Spring Boot with a unified global exception handler, introducing a standard AjaxResult wrapper, custom BusinessException, an error enumeration, and a @RestControllerAdvice that returns consistent JSON error responses across the application.

Error HandlingJavaSpring Boot
0 likes · 6 min read
Master Global Exception Handling in Spring Boot: Unified Error Responses
macrozheng
macrozheng
Nov 4, 2020 · Backend Development

Mastering Spring Boot: Build Clean, Validated, and Unified Backend APIs

Learn how to construct robust Spring Boot backend APIs by integrating essential dependencies, applying concise parameter validation with Validator and BindResult, handling exceptions globally, creating custom error types, and standardizing responses through a unified ResultVO, all while simplifying code and improving maintainability.

API ValidationSpringBootUnified response
0 likes · 20 min read
Mastering Spring Boot: Build Clean, Validated, and Unified Backend APIs
Java Architecture Diary
Java Architecture Diary
May 25, 2020 · Cloud Native

Mastering Global Exception Handling in Spring Cloud Gateway

This article explains why traditional @ControllerAdvice fails in Spring Cloud Gateway, introduces the built‑in ExceptionHandlingWebHandler and DefaultErrorWebExceptionHandler, and shows how to override them with a custom GlobalExceptionConfiguration for robust reactive error handling.

Error HandlingJavaSpring Boot
0 likes · 5 min read
Mastering Global Exception Handling in Spring Cloud Gateway
Java Captain
Java Captain
Apr 12, 2020 · Backend Development

Building a Robust Backend API with Spring Boot: Validation, Global Exception Handling, and Unified Response

This article demonstrates step‑by‑step how to construct a clean and standardized backend API in Spring Boot by introducing required dependencies, using Validator for request parameter checks, applying global exception handling, defining custom exceptions, and implementing a unified response format for both success and error cases.

Backend DevelopmentJavaParameter Validation
0 likes · 20 min read
Building a Robust Backend API with Spring Boot: Validation, Global Exception Handling, and Unified Response