lombok gradle dependency spring boot

To add the Spring framework and Lombok Gradle dependency to your Spring Boot project, follow these steps:

  1. Open your project's build.gradle file.

  2. Locate the dependencies section, usually found under the dependencies {} block.

  3. Add the Spring Boot Gradle plugin by including the following code:

    plugins { id 'org.springframework.boot' version 'x.x.x' }

Replace 'x.x.x' with the version of Spring Boot you want to use.

  1. Add the Lombok dependency by including the following code:

    dependencies { implementation 'org.projectlombok:lombok:1.18.20' annotationProcessor 'org.projectlombok:lombok:1.18.20' }

This adds the Lombok library to your project.

  1. Sync your Gradle project to apply the changes.

The Spring framework and Lombok dependency are now added to your Spring Boot project. You can start using the Spring framework and leverage Lombok's features in your application code.