根据IDEA的提示,是否启用lombok,启用后,发现无法正常启动程序了,报错如下:
java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x109ba79f) 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 @0x109ba79f
pom下查找,原来的版本是1.18.8,改成最新的1.18.24就解决了
<dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.24</version> <scope>provided</scope> </dependency>
最新的版本也可以通过 https://search.maven.org/search?q=g:org.projectlombok%20a:lombok 找到
文章评论