Skip to content

Instantly share code, notes, and snippets.

@alainlompo
Created March 9, 2017 17:48
Show Gist options
  • Save alainlompo/ed83f65d2e793dfbd14db11c6cc84cd2 to your computer and use it in GitHub Desktop.
Save alainlompo/ed83f65d2e793dfbd14db11c6cc84cd2 to your computer and use it in GitHub Desktop.
Simple illustration of Lombok @DaTa annotation to generate boilerplate code
import lombok.Data;
@Data
public class Resource {
private String name;
private String description;
public Resource(String name, String description) {
this.name = name;
this.description = description;
}
}
@alainlompo
Copy link
Author

Lombo will generate the getters and setters for name and description by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment