Spring Boot - Request and Response Handling
Given this controller method:
@PostMapping("/items")
public ResponseEntity addItem(@RequestBody ItemDto item) {
return ResponseEntity.ok("Item added");
}
And this DTO:
public class ItemDto {
@NotBlank
private String title;
}
If the client sends an empty string for title, what is the likely error in the code that prevents validation from working?