Reference:
1. https://www.cnblogs.com/ZZG-GANGAN/p/14789050.html
2. https://www.cjavapy.com/article/1932/
An error occurred when running the java code: java: java .lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor
Environment: IntelliJ IDEA 2021.1.2 x64
problem analysis: JDK version is too high, lombok version is too low
Solution:
1. Upgrade and add version information of lombok
You need to add a line of code to pom.xml. The <version>1.18.12</version>
version information needs to be consistent with that on your computer. You can go to maven to upgrade the version and view it.
2. Use jdk1.8
①File---->Project Structure
②Check if there is jdk version 1.8, if so, skip to step ④, if not, you need to download: SDKs----> + ---->Dowload JDK ③Select
version as 1.8, others can be default
④Click to use the corretto-1.8 version of the JDK, first click Apply, then click OK
and finally run the code again, you can succeed, and the level is successful!