You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve property-dependent parameter names for exception messages
Prior to this commit when a required parameter defined as a property or
expression placeholder was missing, the exception thrown would refer to
the placeholder instead of the resolved name.
This change covers messaging handlers and web controllers, both blocking
and reactive. It also fixes the error message when handling null values
for non-required parameters, as well as in cases that need conversion.
See gh-32323Closesgh-32462
Copy file name to clipboardExpand all lines: spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/reactive/AbstractNamedValueMethodArgumentResolver.java
+3-3
Original file line number
Diff line number
Diff line change
@@ -97,9 +97,9 @@ public Object resolveArgumentValue(MethodParameter parameter, Message<?> message
Copy file name to clipboardExpand all lines: spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/AbstractNamedValueMethodArgumentResolver.java
Copy file name to clipboardExpand all lines: spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/reactive/HeaderMethodArgumentResolverTests.java
Copy file name to clipboardExpand all lines: spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/HeaderMethodArgumentResolverTests.java
Copy file name to clipboardExpand all lines: spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java
+3-3
Original file line number
Diff line number
Diff line change
@@ -123,10 +123,10 @@ public final Object resolveArgument(MethodParameter parameter, @Nullable ModelAn
Copy file name to clipboardExpand all lines: spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java
+36-1
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,7 @@ class RequestHeaderMethodArgumentResolverTests {
Copy file name to clipboardExpand all lines: spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java
0 commit comments