skip to Main Content

Spring doesn't validate JSON request

When I send the request: "Person": { "name": 5 } The request should fail (bad request) because 5 isn't a String. It prints: Person{name='5'}. Similarly, there's no error when I send null. I have these annotations: @JsonProperty("name") @Valid @NotBlank private…

VIEW QUESTION
Back To Top
Search