Lombok plug-in installation (Eclipse/SpringToolSuite4) (Windows and Mac)

Lombok plug-in installation (Eclipse/SpringToolSuite4) (Windows and Mac)

introduce

Lombok is the注解化 solution for Java data classes (i.e. JavaBeans). Using the @Data annotation, methods such as set, get, hashCode, and toString in the data class no longer need to be written manually.

The principle of Lombok is to automatically generate set, get and other methods for data classes annotated with @Data through the compiler plug-in. Therefore, the Java editor is required to install the Lombok plug-in.

Higher versions of IDEA (from version 2020.3 onwards) have automatically integrated Lombok without the need to install additional plug-ins.

Eclipse and its derivative IDEs (such as SpringToolSuite4, etc.) need to use the Lombok installation package and manually install the Lombok plug-in into Eclipse.

This article takesSpringToolSuite4 as an example to introduce the installation steps of the Lombok plug-in.

Download the Lombok installation package

Official website download jar package

Official website download address:Download (projectlombok.org)

Insert image description here

The downloaded installation package is as follows:
Insert image description here

Plug-in installation steps (Windows)

The Lombok plug-in installation steps are as follows:

  1. Install the Lombok plugin. Run the Lombok installation package and install the plug-in into SpringToolSuite4
  2. Restart SpringToolSuite4 to make the plug-in take effect
  3. Check if Lombok plugin is enabled

Install Lombok plugin

  1. Soukai lombak.jar.
  2. The Lombok installation program will automatically search for Eclipse and Eclipse-based IDEs that have been installed on the computer, and list the installation addresses in IDEs.
  3. If the IDE is not found in the automatic search, you can click the Specify location button at the bottom left to manually select the IDE.
  4. Point 击 Install / Update .
  5. Successful installation.
  • Lombok plug-in installation page

Insert image description here

  • Manually select IDE


  • Successful installation

Lombok has been installed in SpringToolSuite4.

Insert image description here

Restart IDE

Restart SpringToolSuite4 to make the Lombok plug-in take effect.

Check if Lombok plugin is enabled

Check whether the Lombok plug-in in SpringToolSuite4 has been enabled.

You can check whether your eclipse has lombok enabled in the eclipse'sabout dialog box. The lombok version will be listed at the end of the copyright text:

Plug-in installation steps (Mac)

Installing the Lombok plug-in on a Mac computer is similar to the Windows platform.

  1. Double-click lombak.jar to automatically detect the installed SpringToolSuite4 and select the version that needs to be installed.
  2. If the IDE is not found in the automatic search, you can click the Specify location button at the bottom left to manually select the IDE.
  3. Point 击 Install / Update .
  4. Successful installation.

The screenshots showing differences between the Windows version and the Windows version are as follows:

Reference (specific usage of Lombok)

For specific usage of Lombok, please refer to the following article:

"Annotation solution for Java data classes (JavaBean): @Data (Lombok implementation)"

Guess you like

Origin blog.csdn.net/sgx1825192/article/details/130081542