|
37 | 37 | import org.springframework.web.bind.MissingServletRequestParameterException; |
38 | 38 | import org.springframework.web.context.request.ServletWebRequest; |
39 | 39 | import org.springframework.web.servlet.LocaleResolver; |
40 | | -import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException; |
41 | 40 |
|
42 | 41 | /** |
43 | 42 | * Default {@code RestErrorResolver} implementation that converts discovered Exceptions to |
@@ -104,7 +103,6 @@ protected final Map<String, String> createDefaultExceptionMappingDefinitions() { |
104 | 103 | applyDef(m, "javax.validation.ValidationException", HttpStatus.BAD_REQUEST); |
105 | 104 |
|
106 | 105 | // 404 |
107 | | - applyDef(m, NoSuchRequestHandlingMethodException.class, HttpStatus.NOT_FOUND); |
108 | 106 | applyDef(m, "org.hibernate.ObjectNotFoundException", HttpStatus.NOT_FOUND); |
109 | 107 |
|
110 | 108 | // 405 |
@@ -230,9 +228,9 @@ protected String getMessage(String msg, ServletWebRequest webRequest, Exception |
230 | 228 | /** |
231 | 229 | * Returns the config-time 'template' RestError instance configured for the specified Exception, or |
232 | 230 | * {@code null} if a match was not found. |
233 | | - * |
| 231 | + * |
234 | 232 | * <p>The config-time template is used as the basis for the RestError constructed at runtime.</p> |
235 | | - * |
| 233 | + * |
236 | 234 | * @param ex |
237 | 235 | * @return the template to use for the RestError instance to be constructed. |
238 | 236 | */ |
@@ -263,10 +261,10 @@ private RestError getRestErrorTemplate(Exception ex) { |
263 | 261 |
|
264 | 262 | /** |
265 | 263 | * Return the depth to the superclass matching. |
266 | | - * |
| 264 | + * |
267 | 265 | * <p>0 means ex matches exactly. Returns -1 if there's no match. |
268 | 266 | * Otherwise, returns depth. Lowest depth wins.</p> |
269 | | - * |
| 267 | + * |
270 | 268 | * @param exceptionMapping |
271 | 269 | * @param ex |
272 | 270 | * @return |
|
0 commit comments