diff --git a/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java b/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java index 484bc42d08f..19a612ec75f 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java +++ b/spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java @@ -185,7 +185,14 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry { request.getRequestDispatcher(path).forward(request, response); } - private String getDescription(HttpServletRequest request) { + /** + * Return the description for the given request. By default this method will return a + * description based on the request {@code servletPath} and {@code pathInfo}. + * @param request the source request + * @return the description + * @since 1.5.0 + */ + protected String getDescription(HttpServletRequest request) { return "[" + request.getServletPath() + (request.getPathInfo() == null ? "" : request.getPathInfo()) + "]"; }