Required arguments with a lombok @Builder
问题 If I add @Builder to a class. The builder method is created. Person.builder().name("john").surname("Smith").build(); I have a requirement where a particular field is required. In this case, the name field is required but the surname is not. Ideally, I would like to declare it like so. Person.builder("john").surname("Smith").build() I can't work out how to do this. I have tried adding the @Builder to a constructor but it didn't work. @Builder public Person(String name) { this.name = name; }