mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Replace getErrors() with getBindingResult() in examples
DataBinder#getErrors was removed in v4.0.0.M1.
Closes gh-36170
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
(cherry picked from commit 385e62dbf0)
This commit is contained in:
committed by
Sam Brannen
parent
13defc09f9
commit
fd8b4d5936
@@ -69,7 +69,7 @@ import org.springframework.web.util.WebUtils;
|
||||
* // trigger actual binding of request parameters
|
||||
* binder.bind(request);
|
||||
* // optionally evaluate binding errors
|
||||
* Errors errors = binder.getErrors();
|
||||
* Errors errors = binder.getBindingResult();
|
||||
* ...</pre>
|
||||
*
|
||||
* @author Rod Johnson
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@ import org.springframework.web.multipart.support.StandardServletPartUtils;
|
||||
* which include specifying allowed/required fields, and registering custom
|
||||
* property editors.
|
||||
*
|
||||
* <p>Can also used for manual data binding in custom web controllers or interceptors
|
||||
* <p>Can also be used for manual data binding in custom web controllers or interceptors
|
||||
* that build on Spring's {@link org.springframework.web.context.request.WebRequest}
|
||||
* abstraction: for example, in a {@link org.springframework.web.context.request.WebRequestInterceptor}
|
||||
* implementation. Simply instantiate a WebRequestDataBinder for each binding
|
||||
@@ -68,7 +68,7 @@ import org.springframework.web.multipart.support.StandardServletPartUtils;
|
||||
* // trigger actual binding of request parameters
|
||||
* binder.bind(request);
|
||||
* // optionally evaluate binding errors
|
||||
* Errors errors = binder.getErrors();
|
||||
* Errors errors = binder.getBindingResult();
|
||||
* ...</pre>
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
Reference in New Issue
Block a user