Skip to content

Instantly share code, notes, and snippets.

@gregturn
Last active May 29, 2017 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregturn/cb300e4b1b71495b5f86939522009d45 to your computer and use it in GitHub Desktop.
Save gregturn/cb300e4b1b71495b5f86939522009d45 to your computer and use it in GitHub Desktop.
Customer domain object - after update
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Customer {
private String firstName;
private String lastName;
public void setName(String wholeName) {
String[] parts = wholeName.split(" ");
this.firstName = parts[0];
this.lastName = parts[1];
}
public String getName() {
return firstName + lastName;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment