Interface NoHandlerFoundAdviceTrait

  • All Superinterfaces:
    AdviceTrait, AdviceTrait
    All Known Subinterfaces:
    ProblemHandling, RoutingAdviceTrait

    @API(status=STABLE)
    public interface NoHandlerFoundAdviceTrait
    extends AdviceTrait
    Transforms NoHandlerFoundExceptions into not-found problems.

    Note: This requires DispatcherServlet.setThrowExceptionIfNoHandlerFound(boolean) being set to true.

    See Also:
    NoHandlerFoundException, Status.NOT_FOUND, DispatcherServlet.setThrowExceptionIfNoHandlerFound(boolean)
    • Method Detail

      • handleNoHandlerFound

        @API(status=INTERNAL)
        @ExceptionHandler
        default org.springframework.http.ResponseEntity<org.zalando.problem.Problem> handleNoHandlerFound​(org.springframework.web.servlet.NoHandlerFoundException exception,
                                                                                                          org.springframework.web.context.request.NativeWebRequest request)