6

Eclipse throws error message that

"the blank final field may not have been initialized"

even when i have the @RequiredArgsConstructor set.

@Component
@RequiredArgsConstructor
class DataWriter implements ApplicationRunner{

    private final AccountRepository accountRepo;

    @Override
    public void run(ApplicationArguments args) throws Exception {

    }

}

Compilation should not throw error because Lombok should have created the constructors automatically

Android
  • 1,420
  • 4
  • 13
  • 23
Dennis Cai
  • 159
  • 1
  • 4
  • Possible duplicate of [Cannot make Project Lombok work on Eclipse (Helios)](https://stackoverflow.com/questions/3418865/cannot-make-project-lombok-work-on-eclipse-helios) – Roddy of the Frozen Peas Feb 02 '19 at 07:04

1 Answers1

8

Eclipse doesn't support Lombok by default even after i have the lombok dependency in my pom.xml.

According to https://projectlombok.org/setup/eclipse, I'll need to run the lombok.jar by double-clicking it to have it look for the eclipse ide and install the plugin into eclipse. Eclipse restart is required.

Dennis Cai
  • 159
  • 1
  • 4