Lombok in Maven and idea

Time:2020-5-21

maven

       <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.10</version>
            <scope>provided</scope>
        </dependency>

idea

Add Lombok plugin

Lombok in Maven and idea

Project configuration

Preferences – build, execution, deployment – compiler – annotation processors – enable annotation processing

Lombok in Maven and idea

Using in Java

@Data
@Builder
public class Product {

}

docs

  • Magic of Java – use Lombok to eliminate your redundant code

Recommended Today

IView, upload component beforeupload compress image

critical code <Upload multiple :format=”[‘jpg’,’jpeg’,’png’]” :beforeUpload=”beforeUpload” action=”” :on-success=”upload” > < button icon = “IOS cloud upload outline” > upload picture < / button > </Upload> import Compressor from “compressorjs” beforeUpload(file) { return new Promise((resolve, reject) => { let isLt1M = file.size / 1024 / 1024 < 1; if (isLt1M) { resolve(file); } new Compressor(file, { […]