Spring will choose the method that handles the more specific exception type. As a rule of thumb, If an @ExceptionHandler method matches the exact type of the exception, Spring will use that method. If no specific handler is found, Spring will use the more generic handler (Exception or Throwable).
Spring will choose the method that handles the more specific exception type.
Ben Meehan
August 13, 2024
0 comments0 views
Originally published on Medium
← All blog posts
Ben Meehan
Author & Publisher at Spacetime. Writing about distributed systems, AI, and software engineering.


