import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class User {
@NotBlank
private String username;
import org.springframework.validation.annotation.Validated;
@PostMapping("/user")
public User create(@Validated @RequestBody User user) {