From 53b3b934fc8b70745f45214dafa7a6b7fed08cab Mon Sep 17 00:00:00 2001 From: xumengqi <2663479778@qq.com> Date: Wed, 8 Jan 2025 23:18:02 +0800 Subject: [PATCH] BindException declared but not handled by ExceptionHandler Closes gh-34214 Signed-off-by: Mengqi Xu <2663479778@qq.com> --- .../mvc/method/annotation/ResponseEntityExceptionHandler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java index f1a457ad5b..c29742a959 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ import org.springframework.http.ResponseEntity; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.HttpMessageNotWritableException; import org.springframework.lang.Nullable; -import org.springframework.validation.BindException; import org.springframework.validation.method.MethodValidationException; import org.springframework.web.ErrorResponse; import org.springframework.web.ErrorResponseException; @@ -136,7 +135,6 @@ public abstract class ResponseEntityExceptionHandler implements MessageSourceAwa HttpMessageNotReadableException.class, HttpMessageNotWritableException.class, MethodValidationException.class, - BindException.class, AsyncRequestNotUsableException.class }) @Nullable