This commit is contained in:
Rossen Stoyanchev 2017-11-10 11:29:58 -05:00
parent ff97eafa4f
commit f565f635e3
2 changed files with 5 additions and 3 deletions

View File

@ -90,8 +90,10 @@ public class ErrorsMethodArgumentResolver extends HandlerMethodArgumentResolverS
Object errors = context.getModel().asMap().get(BindingResult.MODEL_KEY_PREFIX + name);
Assert.notNull(errors, "An Errors/BindingResult argument is expected to be declared " +
"immediately after the @ModelAttribute argument to which it applies: " +
Assert.notNull(errors, "An Errors/BindingResult argument is expected " +
"immediately after the @ModelAttribute argument to which it applies. " +
"For @RequestBody and @RequestPart arguments, please declare them with a reactive type wrapper " +
"and use its onError operators to handle WebExchangeBindException: " +
parameter.getMethod());
return errors;

View File

@ -123,7 +123,7 @@ public class ErrorsMethodArgumentResolverTests {
public void resolveWithBindingResultNotFound() throws Exception {
this.expectedException.expectMessage("An Errors/BindingResult argument is expected " +
"to be declared immediately after the @ModelAttribute argument");
"immediately after the @ModelAttribute argument");
MethodParameter parameter = this.testMethod.arg(Errors.class);
this.resolver.resolveArgument(parameter, this.bindingContext, this.exchange)