title: Spring @Controller exception handler and global exception handler. How to invoke both
body: <p>I have a global exception handler to share across REST <code>@Controller</code>s. For this I use a <code>@ControllerAdvice</code> with some <code>@ExceptionHandler</code> methods. This works fine. Now, if I add an <code>@ExceptionHandler</code> in a particular Rest Controller then that new handler takes precedence over the global exception handler and the global one is just never called. </p>
  
  <p>What I need is actually to have <em>both</em> called. The order doesn't matter. The point is that there is some global, controller-agnostic error handling code and also some controller-specific error handling and I need both to execute. Is this possible? e.g. Can I somehow in the controller-specific handler (which is called first) mark the exception handling as not handled so the next handler in line is invoked?</p>
  
  <p>I know I could inject the <code>@ControllerAdvice</code> in the <code>@Controller</code> and invoke the global handler from the specific one myself, but I rather keep the controller decoupled from the global exception handler</p>