@ExceptionHandler methods on the Controller are always selected before those on any @ControllerAdvice instance
So as user I can't override the Spring DATA REST behavior without reimplement an HandlerExceptionResolver in order to inverse order choice between @ControllerAdvice and @ExceptionHandler methods
By switching the @ExceptionHandler methods to an instance of @ControllerAdvice user can override behavior by adding another @ControllerAdvice with better @Order inside applicationContext.
But we should be keep in mind this issue https://jira.spring.io/browse/SPR-11570. I don't know if the previous mechanism can works without the shared @ControllerAdvice, but I will try it as soon as possible.
If accepted I can send a pull request. I have already forked a working repository with @ControllerAdvice
With this improvement in place (together with DATAREST-388) SDR will finally provide a minimum level of control with regards to error handling. Having some experience with Jersey projects, I will say SDR is about to catch up on this subject
I've used the code provided in the pull request but applied some general polishing (see this commit).
Unfortunately an @Order annotation will be required for the custom controller advice anyway as the default order an unannotated component gets is lowest priority to. So we'd basically depend on the component detection order. Not annotating the class is basically equivalent to @Order(Ordered.LOWEST_PRECENDENCE)