forked from spring-projects/spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop throwing BindingException in tests
This commit adapts the error controller tests that need the request to fail with a bind issue, and simulate the behavior of ModelAttributeMethodProcessor. As of Spring Framework 6.0.x, this processor no longer throws a BindingException, but rather a MethodArgumentNotValidException and the handing of BindException itself is deprecated. This makes sure that those tests can smoothly be executed against Spring Framework 6.2.x as throwing a BindingException now results into an unresolved exception, and an internal server error rather than the expected bad request.
- Loading branch information
Showing
2 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters