Tag

ControllerAdvice

1 views collected around this technical thread.

Java Architecture Diary
Java Architecture Diary
Apr 18, 2025 · Backend Development

How to Disable Automatic HTTP Header Binding in Spring Boot 3.4 and Avoid Version Field Conflicts

This article explains why Spring Boot 3.4's new automatic HTTP header binding can corrupt DTO fields like version used for optimistic locking, and provides a global ControllerAdvice solution plus alternative strategies to prevent such conflicts in microservice environments.

ControllerAdviceHTTP Header BindingMicroservices
0 likes · 6 min read
How to Disable Automatic HTTP Header Binding in Spring Boot 3.4 and Avoid Version Field Conflicts
Architect's Guide
Architect's Guide
Dec 23, 2024 · Backend Development

Implementing API Request and Response Encryption/Decryption with Spring Boot and ControllerAdvice

This article walks through the design and implementation of symmetric AES encryption for both GET and POST API endpoints in a Spring Boot application, covering requirement analysis, data model definition, custom RequestBodyAdvice and ResponseBodyAdvice, serialization challenges with FastJSON vs Jackson, and final configuration to ensure consistent JSON output across encrypted and non‑encrypted responses.

AESAPI EncryptionControllerAdvice
0 likes · 12 min read
Implementing API Request and Response Encryption/Decryption with Spring Boot and ControllerAdvice
Architecture Digest
Architecture Digest
Oct 16, 2024 · Backend Development

Implementing Request and Response Encryption in Spring Boot with ControllerAdvice

This article walks through the design and implementation of symmetric request/response encryption for a Spring Boot API, covering requirement analysis, data models, custom ControllerAdvice for decryption and encryption, serialization challenges with FastJson and Jackson, and final configuration to keep encrypted payloads consistent across Android, iOS, and H5 clients.

API EncryptionControllerAdviceJackson
0 likes · 12 min read
Implementing Request and Response Encryption in Spring Boot with ControllerAdvice
Code Ape Tech Column
Code Ape Tech Column
Sep 27, 2024 · Information Security

Implementing API Request and Response Encryption/Decryption with Spring MVC and ControllerAdvice

This article demonstrates how to secure API interfaces by implementing symmetric encryption and decryption for both GET and POST requests in a Spring MVC application, using ControllerAdvice to intercept and process request and response bodies, handling key management, signature verification, and serialization issues across H5, Android, and iOS clients.

API securityControllerAdviceEncryption
0 likes · 14 min read
Implementing API Request and Response Encryption/Decryption with Spring MVC and ControllerAdvice
Architect's Guide
Architect's Guide
May 10, 2024 · Backend Development

Implementing Request and Response Encryption in Spring Boot with ControllerAdvice and Jackson

This article demonstrates how to secure Spring Boot APIs by encrypting request and response bodies using custom ControllerAdvice, switching from FastJson to Jackson for proper enum and date serialization, and configuring ObjectMapper to produce consistent JSON output across encrypted and non‑encrypted endpoints.

API securityControllerAdviceEncryption
0 likes · 13 min read
Implementing Request and Response Encryption in Spring Boot with ControllerAdvice and Jackson
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Mar 7, 2024 · Backend Development

Mastering @InitBinder in Spring Boot: Custom Data Binding Techniques

This guide explains how to use @InitBinder and @ControllerAdvice in Spring Boot 2.7.16 to customize WebDataBinder for request parameter conversion, demonstrates practical examples in controllers and global configuration, and shows how to register converters for flexible data binding.

@InitBinderControllerAdviceData Binding
0 likes · 6 min read
Mastering @InitBinder in Spring Boot: Custom Data Binding Techniques
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 25, 2023 · Backend Development

Comprehensive Guide to Interface Exception Handling in Spring Boot

This article explains how to classify interface exceptions, implement unified handling using Spring Boot's @ControllerAdvice and custom ErrorController, and provides practical code examples for business, system, client, and filter exceptions, including redirect and error page strategies.

ControllerAdviceErrorControllerException Handling
0 likes · 19 min read
Comprehensive Guide to Interface Exception Handling in Spring Boot
Architecture Digest
Architecture Digest
Nov 9, 2023 · Backend Development

Elegant Unified Exception Handling in Spring Using Assertions and Enums

This article explains how to replace repetitive try‑catch blocks in Spring applications with a clean, assertion‑based approach combined with @ControllerAdvice and enum‑driven error codes, providing a unified way to handle service‑layer, controller‑layer, and unknown exceptions while keeping responses consistent and internationalized.

AssertionsControllerAdviceException Handling
0 likes · 20 min read
Elegant Unified Exception Handling in Spring Using Assertions and Enums
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Aug 25, 2023 · Backend Development

Mastering Global and Local Exception Handling with @ControllerAdvice in Spring

This guide explains how to use @ControllerAdvice and @RestControllerAdvice for unified exception handling in Spring, compares their behavior, demonstrates local versus global handling, and shows advanced filtering by annotation, controller class, or package with practical code examples.

ControllerAdviceExceptionHandlingJava
0 likes · 6 min read
Mastering Global and Local Exception Handling with @ControllerAdvice in Spring
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 9, 2023 · Backend Development

Mastering Global and Local Exception Handling with @ControllerAdvice in Spring

This article explains how to use @ControllerAdvice and @RestControllerAdvice for both local and global exception handling in Spring, demonstrates limiting handlers by annotation, controller class, or package, and clarifies the precedence rules between local and global handlers.

ControllerAdviceException HandlingRestControllerAdvice
0 likes · 7 min read
Mastering Global and Local Exception Handling with @ControllerAdvice in Spring
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 16, 2023 · Backend Development

Master Spring MVC Exception Handling: Local, Global, and REST API Strategies

This article explains how to use @ExceptionHandler with @Controller, @ControllerAdvice, and @RestControllerAdvice for local and global exception handling in Spring MVC, details supported method parameters and return types, and shows how to customize REST API error responses by extending ResponseEntityExceptionHandler.

ControllerAdviceException HandlingJava
0 likes · 10 min read
Master Spring MVC Exception Handling: Local, Global, and REST API Strategies
Code Ape Tech Column
Code Ape Tech Column
Dec 14, 2022 · Information Security

Implementing API Request and Response Encryption in Spring Boot with ControllerAdvice

This article walks through a complete Spring Boot solution for encrypting and decrypting API requests and responses, covering requirement analysis, data models, custom ControllerAdvice implementations, serialization challenges, and practical code examples using AES and Jackson.

AESAPI securityControllerAdvice
0 likes · 14 min read
Implementing API Request and Response Encryption in Spring Boot with ControllerAdvice
Top Architect
Top Architect
Oct 22, 2022 · Backend Development

Unified Exception Handling in Spring Using @ControllerAdvice and Custom Assertions

This article explains how to replace repetitive try‑catch blocks in Spring applications with a unified exception handling mechanism based on @ControllerAdvice, custom assertion utilities, and enum‑driven business exceptions, while also showing how to standardize response structures and integrate internationalization.

AssertionsControllerAdviceExceptionHandling
0 likes · 11 min read
Unified Exception Handling in Spring Using @ControllerAdvice and Custom Assertions
Architect's Tech Stack
Architect's Tech Stack
Oct 21, 2022 · Backend Development

Unified Exception Handling in Spring: @ControllerAdvice, Assert, and Enum‑Based Business Exceptions

This article explains how to centralize exception handling in Spring applications using @ControllerAdvice, replace repetitive null‑checks with Assert utilities, and combine enums with custom BusinessException classes to create a clean, maintainable backend error‑handling strategy.

AssertControllerAdviceExceptionHandling
0 likes · 10 min read
Unified Exception Handling in Spring: @ControllerAdvice, Assert, and Enum‑Based Business Exceptions
Code Ape Tech Column
Code Ape Tech Column
Jul 27, 2022 · Backend Development

Implementing Request and Response Encryption in Spring MVC with ControllerAdvice

This article presents a step‑by‑step guide on securing Spring MVC interfaces by encrypting and decrypting both GET and POST requests using symmetric AES, custom ControllerAdvice components, and Jackson configuration to ensure consistent JSON serialization across mobile, H5, and backend services.

AESControllerAdviceEncryption
0 likes · 12 min read
Implementing Request and Response Encryption in Spring MVC with ControllerAdvice
Top Architect
Top Architect
Jul 3, 2022 · Backend Development

Implementing Request and Response Encryption in Spring MVC Using ControllerAdvice

This article demonstrates how to secure GET and POST API endpoints in a Spring MVC application by encrypting request bodies and responses with AES, using custom ControllerAdvice classes, handling serialization issues with FastJSON and Jackson, and configuring ObjectMapper for proper date and enum formatting.

AESControllerAdviceEncryption
0 likes · 15 min read
Implementing Request and Response Encryption in Spring MVC Using ControllerAdvice
IT Architects Alliance
IT Architects Alliance
Mar 3, 2022 · Backend Development

Unified Exception Handling in Spring Using @ControllerAdvice, Assertions, and Enums

This article explains how to replace repetitive try‑catch blocks in Java Spring applications with a clean, unified exception handling approach that leverages @ControllerAdvice, custom Assert utilities, enum‑based error codes, and standardized response objects to improve code readability and maintainability.

AssertControllerAdviceException Handling
0 likes · 20 min read
Unified Exception Handling in Spring Using @ControllerAdvice, Assertions, and Enums
macrozheng
macrozheng
Aug 4, 2021 · Backend Development

Master Global Exception Handling in Spring Boot with @ControllerAdvice

This article explains how to use Spring Boot's @ControllerAdvice and @ExceptionHandler annotations to implement clean, global exception handling, covering basic usage, controller‑specific handlers, and ordered advice for multiple handlers, with practical code examples and diagrams.

ControllerAdviceException HandlingJava
0 likes · 7 min read
Master Global Exception Handling in Spring Boot with @ControllerAdvice
Selected Java Interview Questions
Selected Java Interview Questions
Jul 23, 2021 · Backend Development

Global Exception Handling in Spring MVC Using @ControllerAdvice and @ExceptionHandler

This article explains why global exception handling is needed in Spring MVC, outlines its application scenarios, compares AOP with the simpler @ControllerAdvice/@ExceptionHandler approach, and provides detailed code examples for custom response objects, validation handling, and transaction rollback strategies to improve code cleanliness and maintainability.

ControllerAdviceException HandlingJava
0 likes · 11 min read
Global Exception Handling in Spring MVC Using @ControllerAdvice and @ExceptionHandler