Subtle pitfalls of lombok

lombok is a library that needs to be included in the IDE.

lombok doesn't work just by incorporating it into a project! After incorporating it into your project, you need to install it in your IDE.

How to use

Incorporate into Maven dependencies

pom.xml


		<!-- lombok -->
		<dependency>
    		<groupId>org.projectlombok</groupId>
    		<artifactId>lombok</artifactId>
    		<scope>provided</scope>
		</dependency>

The version is managed by Spring IO Platform. Update the project after drawing

"Run" the dropped library

The lombok jar file is an executable installer. Double click to run! image.png

Install lombok in Eclipse!

lombok will automatically search for Eclipse. Check the Eclipse you are using and Install / Update!

image.png

Restart eclipse

Restart Eclipse.

After rebooting, the @Data annotation color should have changed Getters / Setters should have been generated for the object.

image.png

Recommended Posts

Subtle pitfalls of lombok
[Spring] Pitfalls of BeanUtils.copyProperties
pitfalls of nextInt () → nextLine ()
Pitfalls of Active Hash
About @Accessors of Lombok
Pitfalls of WebTarget.queryParam () in JAX-RS