@@ -252,7 +252,6 @@ else if (ex instanceof AsyncRequestTimeoutException) {
252
252
protected ModelAndView handleHttpRequestMethodNotSupported (HttpRequestMethodNotSupportedException ex ,
253
253
HttpServletRequest request , HttpServletResponse response , @ Nullable Object handler ) throws IOException {
254
254
255
- pageNotFoundLogger .warn (ex .getMessage ());
256
255
String [] supportedMethods = ex .getSupportedMethods ();
257
256
if (supportedMethods != null ) {
258
257
response .setHeader ("Allow" , StringUtils .arrayToDelimitedString (supportedMethods , ", " ));
@@ -376,9 +375,6 @@ protected ModelAndView handleServletRequestBindingException(ServletRequestBindin
376
375
protected ModelAndView handleConversionNotSupported (ConversionNotSupportedException ex ,
377
376
HttpServletRequest request , HttpServletResponse response , @ Nullable Object handler ) throws IOException {
378
377
379
- if (logger .isWarnEnabled ()) {
380
- logger .warn ("Failed to convert request element: " + ex );
381
- }
382
378
sendServerError (ex , request , response );
383
379
return new ModelAndView ();
384
380
}
@@ -397,9 +393,6 @@ protected ModelAndView handleConversionNotSupported(ConversionNotSupportedExcept
397
393
protected ModelAndView handleTypeMismatch (TypeMismatchException ex ,
398
394
HttpServletRequest request , HttpServletResponse response , @ Nullable Object handler ) throws IOException {
399
395
400
- if (logger .isWarnEnabled ()) {
401
- logger .warn ("Failed to bind request element: " + ex );
402
- }
403
396
response .sendError (HttpServletResponse .SC_BAD_REQUEST );
404
397
return new ModelAndView ();
405
398
}
@@ -420,9 +413,6 @@ protected ModelAndView handleTypeMismatch(TypeMismatchException ex,
420
413
protected ModelAndView handleHttpMessageNotReadable (HttpMessageNotReadableException ex ,
421
414
HttpServletRequest request , HttpServletResponse response , @ Nullable Object handler ) throws IOException {
422
415
423
- if (logger .isWarnEnabled ()) {
424
- logger .warn ("Failed to read HTTP message: " + ex );
425
- }
426
416
response .sendError (HttpServletResponse .SC_BAD_REQUEST );
427
417
return new ModelAndView ();
428
418
}
@@ -444,9 +434,6 @@ protected ModelAndView handleHttpMessageNotReadable(HttpMessageNotReadableExcept
444
434
protected ModelAndView handleHttpMessageNotWritable (HttpMessageNotWritableException ex ,
445
435
HttpServletRequest request , HttpServletResponse response , @ Nullable Object handler ) throws IOException {
446
436
447
- if (logger .isWarnEnabled ()) {
448
- logger .warn ("Failed to write HTTP message: " + ex );
449
- }
450
437
sendServerError (ex , request , response );
451
438
return new ModelAndView ();
452
439
}
@@ -520,6 +507,7 @@ protected ModelAndView handleBindException(BindException ex, HttpServletRequest
520
507
protected ModelAndView handleNoHandlerFoundException (NoHandlerFoundException ex ,
521
508
HttpServletRequest request , HttpServletResponse response , @ Nullable Object handler ) throws IOException {
522
509
510
+ pageNotFoundLogger .warn (ex .getMessage ());
523
511
response .sendError (HttpServletResponse .SC_NOT_FOUND );
524
512
return new ModelAndView ();
525
513
}
0 commit comments