Install lombok plug-in for Eclipse

1. Statement

The current content is mainly used for my review and learning, mainly for eclipse to configure the limbok plug-in again

2. Specific steps

  1. Download lombok.jar online
  2. Put lombok.jar into the eclipse directory
  3. Use cmd to switch to lombok.jar to perform the installation operation: java -jar lombok.jar
  4. Install directly to view the results

Insert picture description here

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

In fact, you can directly add the last line in eclipse.ini in eclipse:-javaagent:D:\eclipse\lombok.jar

Then you can write code happily, but you still have to import the lombok package in the project

<dependency>
	<groupId>org.projectlombok</groupId>
	<artifactId>lombok</artifactId>
	<version>1.18.12</version>
	<scope>provided</scope>
</dependency>
@Data
public class MyThing {
    
    
	private Integer id;
	private Date now;
	
	public MyThing(Integer id) {
    
    
		super();
		this.id = id;
		this.now = new Date();
	}
	
}

Guess you like

Origin blog.csdn.net/weixin_45492007/article/details/114818142