Tagged articles

HandlerMethodArgumentResolver

6 articles · Page 1 of 1
Code Ape Tech Column
Code Ape Tech Column
Nov 11, 2025 · Backend Development

Pass User Info from Filter to Controller via Spring MVC Argument Resolver

This article explains how to transfer the current user ID extracted from a JWT token in a filter to Spring MVC controller methods using a custom HandlerMethodArgumentResolver, highlighting drawbacks of ThreadLocal and request attributes, and demonstrating a type‑safe, extensible solution with code examples.

HandlerMethodArgumentResolverJavafilter
0 likes · 11 min read
Pass User Info from Filter to Controller via Spring MVC Argument Resolver
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 18, 2025 · Backend Development

Why Spring MVC Auto‑Binds Header Data to Your DTO – The Hidden Mechanism Explained

This article explores why Spring MVC automatically binds HTTP header values to controller method parameters, demonstrates the issue with a sample Spring Boot 3.4.0 project, analyzes the underlying HandlerMethodArgumentResolver and ServletModelAttributeMethodProcessor code, and provides two practical solutions to prevent unwanted header binding.

HandlerMethodArgumentResolverHeader BindingJava
0 likes · 8 min read
Why Spring MVC Auto‑Binds Header Data to Your DTO – The Hidden Mechanism Explained
Shepherd Advanced Notes
Shepherd Advanced Notes
Aug 23, 2024 · Backend Development

Which Spring MVC Extension Points Parse Parameters and Handle Return Values?

This article explains the purpose and usage of Spring MVC’s HandlerMethodArgumentResolver and HandlerMethodReturnValueHandler extension points, demonstrates how to implement custom argument resolvers and return‑value handlers, discusses common pitfalls such as handler ordering, and shows how to replace the default processors to achieve unified request and response processing.

HandlerMethodArgumentResolverHandlerMethodReturnValueHandlerJava
0 likes · 16 min read
Which Spring MVC Extension Points Parse Parameters and Handle Return Values?
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 30, 2024 · Backend Development

Simplify JWT Retrieval in Spring Boot Controllers with a Custom Argument Resolver

This article demonstrates how to create a custom HandlerMethodArgumentResolver in Spring Boot that automatically extracts JWT token data and injects the corresponding user object—or selected fields—directly into controller method parameters, reducing boilerplate and improving code readability.

HandlerMethodArgumentResolverJWTSpring Boot
0 likes · 8 min read
Simplify JWT Retrieval in Spring Boot Controllers with a Custom Argument Resolver
Architect's Journey
Architect's Journey
Feb 6, 2023 · Backend Development

Simplify Kafka Consumer Code with a Custom Method Argument Resolver

The article demonstrates how to use Spring's HandlerMethodArgumentResolver to automatically convert Kafka messages into typed method parameters, eliminating repetitive JSON parsing code and showing a complete implementation, usage example, and notes on version support and performance considerations.

HandlerMethodArgumentResolverJavaMessage Conversion
0 likes · 6 min read
Simplify Kafka Consumer Code with a Custom Method Argument Resolver