Closed as not planned
Closed as not planned
Description
Background
In many real-world REST APIs, developers want to handle exceptions differently per controller (e.g., user-facing vs. admin APIs). While @ControllerAdvice
is powerful, it is global or package-scoped, which can lead to tight coupling and handler bloat.
Proposed Feature
Introduce a simple way to annotate a controller with a custom exception handler delegate, like:
@UseExceptionHandler(UserExceptionHandler.class)
@RestController
@RequestMapping("/users")
public class UserController {
...
}