Spring Boot 2.2.5 does not run bean validation for null fields #20365
Labels
for: external-project
For an external project and not something we can fix
status: duplicate
A duplicate of another issue
I believe there is a regression between Spring Boot 2.2.4 and 2.2.5 in handling bean validation.
I have a small project reproducing it: https://github.com/pkubowicz/spring-validation-bug
In short:
@NotBlank
field calledid
, additionally the constructor does a null-checkandExpect(status().isBadRequest())
(second problem)I think apart from fixing validation behaviour, Mock MVC should be fixed so that calling
mvc.perform()
never throws an exception and you can just write a test asserting on MVC result.Stacktrace:
Curl:
The text was updated successfully, but these errors were encountered: