Fix DefaultErrorViewResolver after HttpStatus changes

Since SPR-16898, `HttpStatus.toString()` has changed and we should
instead rely on `HttpStatus.value()` to get the HTTP status number.
This commit is contained in:
Brian Clozel 2018-06-19 15:02:45 +02:00
parent 6970f19ce3
commit 28c1bc9986
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public class DefaultErrorViewResolver implements ErrorViewResolver, Ordered {
@Override
public ModelAndView resolveErrorView(HttpServletRequest request, HttpStatus status,
Map<String, Object> model) {
ModelAndView modelAndView = resolve(String.valueOf(status), model);
ModelAndView modelAndView = resolve(String.valueOf(status.value()), model);
if (modelAndView == null && SERIES_VIEWS.containsKey(status.series())) {
modelAndView = resolve(SERIES_VIEWS.get(status.series()), model);
}