How to enable lombok in Spring tool suite?
Ramya K

Ramya K @ramya_kamalasekaran

About: Having 2.5 years of Experience in Software field. After a career gap planning to start my career again

Joined:
Jan 26, 2025

How to enable lombok in Spring tool suite?

Publish Date: Jun 29
1 0

Lombok is used to reduce boiler plate code.

Step:1.Create project with Lombok as a dependency.
Step:2 Once it is created open Maven dependency from Project Explorer

Image description

Step:3. Copy paste that path lombok path in the windows explorer. Find lombok executable file double click it.

Image description

Step:4. Click Specific location and find the springtoolsuite initialization software where you have installed in your system then install then quit Installer

Image description

Image description
Step:5. Close and reopen SpringToolSuite(STS) once.

Now Lombok will work fine in your STS. Without any error it works very well.

package com.courseapp.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@NoArgsConstructor
@AllArgsConstructor
@data
//@Getter
//@setter
//@ToString
public class Course {

private String courseName;
private Integer courseId;
private String type; 
private double cost;
private int durationInWeeks;
Enter fullscreen mode Exit fullscreen mode

}

Comments 0 total

    Add comment