Created
March 9, 2017 17:48
-
-
Save alainlompo/ed83f65d2e793dfbd14db11c6cc84cd2 to your computer and use it in GitHub Desktop.
Simple illustration of Lombok @DaTa annotation to generate boilerplate code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lombo will generate the getters and setters for name and description by default.