mybatis lombok 报错: java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor
1. 报错原因:jdk版本太高,lombok版本太低
2. 解决办法:安装更高版本的依赖包,可以去Maven Repository: lombok去查:https://mvnrepository.com/search?q=lombok,看有哪些新版本,多尝试下就没问题
java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x60ddd074) 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 @0x60ddd074
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.20</version> </dependency>