1. Download Lombok.jar Http://projectlombok.org/downloads/lombok.jar
2. Running Lombok.jar:java-jar D:\dev\java\libs\lombok.jar
A box will pop up after a few seconds to confirm the installation path for Eclipse
3. After confirming the installation path of Eclipse, click the Install/update button to complete the installation .
4. After the installation is complete, make sure that there is a Lombok.jar package under the Eclipse installation path and that
does the configuration file Eclipse.ini include the following:
-javaagent:lombok.jar
-xbootclasspath/a:lombok.jar
If the above answer is true, then congratulations on your installation, or add the missing part to the appropriate location
5. Restart Eclipse or MyEclipse
6. Create a Java project and set up the following classes:
@Data @noargsconstructor@allargsconstructorpublic class Person {private string id;private string Name;private string Identity;}
7, use the JAVAP command to view the DataObject class compiled classes file to see if the corresponding getter, setter method is generated
Manually add lombok.jar and configuration file Eclipse.ini whether the following is added:
-javaagent:lombok.jar
-xbootclasspath/a:lombok.jar
Restart can
Using Lombok in Eclipse