java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x5909b5c9) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x5909b5c9
解决方法:
修改pom.xml中的lombok依赖版本号为最新版本
如当前为:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</dependency>
修改为:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
</dependency>