Utilise Lombok for Boilerplate Code

Project Lombok provides build tool utilities to reduce the amount of boilerplate code required when writing large model classes and inter-dependent services, through the usage of a number of Java annotations.
Utility classes are a common occurrence when writing enterprise applications - and Lombok provides an annotation to automatically implement a number of written functionalities - @UtilityClass. It will mark any member of the class as static, create a non-instantiable private constructor, and mark the class final.
// Without Lombok
public final class UtilityClass {
    
    public static final int CODE = 123;
    
    private UtilityClass() {
        throw new java.lang.UnsupportedOperationException("This is a utility class and cannot be instantiated");
    }
  
    public static Date getCurrentDate() {
        return Date().toLocalDate();
    }
}

// With Lombok
@UtilityClass
public class UtilityClass {
    
    public final int CODE = 123;
    
    public Date getCurrentDate() {
        return Date().toLocalDate();
    }
}

Code Coverage Analysis

If using a code analysis tool in your CI - consider adding the following code block to improve your test coverage on annotated classes/methods.
lombok.addLombokGeneratedAnnotation = true

Working with Spring

When working with Spring (Java application development framework) there are a number of ways that Lombok can be used to remove further boilerplate; using the Spring @Autowired allows a classes dependencies to be handled by Spring, but can result in un-needed constructor setup. Instead using the @RequiredArgsConstructor with dependencies declared as final variables enables this to happen at compile time.
// Without Lombok
@Service
public class ServiceWithDependencies {
    
    private DependencyOne dependencyOne;
    
    private DependencyTwo dependencyTwo;
    
    @Autowired
    public ServiceWithDependencies(DependencyOne dependencyOne, DependencyTwo dependencyTwo) {
        this.dependencyOne = dependencyOne;
        this.dependencyTwo = dependencyTwo;
    }
}

// With Lombok
@Service
@RequiredArgsConstructor
public class ServiceWithDependencies {
    
    private final DependencyOne dependencyOne;
    
    private final DependencyTwo dependencyTwo;
}
Instead of defining individual logger variables for each component within Spring, the @Slf4j annotation can be used instead as seen below.
// Without Lombok
@Service
public class ServiceWithLogging {

    private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ServiceWithLogging.class);
    
    public void logSomething() {
        log.info("Log something");
    }
}

// With Lombok
@Slf4j
@Service
public class ServiceWithLogging {

    public void logSomething() {
        log.info("Log something");
    }
}
boilerplate
annotations
code-generation