@Test public void notFound() { String view = ErrorController.notFound("key"); assertEquals("/error/" + HttpServletResponse.SC_NOT_FOUND + "/key", removeViewPrefix(view)); assertForward(view); }
public static String notFound(String messageKey) { Assert.hasLength(messageKey); return "forward:/error/" + HttpServletResponse.SC_NOT_FOUND + "/" + messageKey; }
ErrorController { public static String notFound(String messageKey) { Assert.hasLength(messageKey); return "forward:/error/" + HttpServletResponse.SC_NOT_FOUND + "/" + messageKey; } }
ErrorController { public static String notFound(String messageKey) { Assert.hasLength(messageKey); return "forward:/error/" + HttpServletResponse.SC_NOT_FOUND + "/" + messageKey; }  }
ErrorController { public static String notFound(String messageKey) { Assert.hasLength(messageKey); return "forward:/error/" + HttpServletResponse.SC_NOT_FOUND + "/" + messageKey; }  @RequestMapping("/{statusCode:[0-9]+}/{messageKey:[a-zA-Z0-9\\.]+}") @PreAuthorize("permitAll") String sendError(@PathVariable int statusCode, @PathVariable String messageKey, Model model); static String timeout(); static String notFound(String messageKey); static String notModified(); static String forbidden(); }
ErrorController { public static String notFound(String messageKey) { Assert.hasLength(messageKey); return "forward:/error/" + HttpServletResponse.SC_NOT_FOUND + "/" + messageKey; }  @RequestMapping("/{statusCode:[0-9]+}/{messageKey:[a-zA-Z0-9\\.]+}") @PreAuthorize("permitAll") String sendError(@PathVariable int statusCode, @PathVariable String messageKey, Model model); static String timeout(); static String notFound(String messageKey); static String notModified(); static String forbidden();  }