Briefly
This is my first blog in the true sense, recording the longest problem I have solved since transcoding. It took me three days on and off to finally solve the problem. The sense of achievement is very powerful! I also shared with you my problem-solving process and reference articles, and also asked the opinions of my classmates who have worked (in the Internet industry).
question
-
Overview: IDEA configuration maven and lombok burst various errors
-
Solution: replace jdk16.0.1 with jdk1.8 (java8)
Original arrangement
Understand idea 2021.3 +jdk16.0.1
Process description
I watched the video of Mad God on bilibili to learn java, but the video of Mad God was a bit incoherent. There was a section where two things, maven and lombok suddenly appeared. I was confused and started to configure the environment. .
On the first day , I followed the online tutorial to configure maven and lombok, and there were all kinds of 黄色警告
things. It took an afternoon to configure, and then I went to do other things.
The next day I went to idea and wrote a multi-threaded video according to Mad God's video. Not only 黄色警告
did it not eliminate it, but 报错
at the time I thought it was a problem with the idea version, so I tried to jump back from idea to 2020, but still reported an error, and then jumped back to 2019 , through some configuration, you can not report an error. Then do something else.
On the third day , when I opened the idea and ran the program, I found the following problems:
By consulting the information on the Internet, it can be inferred that it is a problem with the jdk version. But at this time, after many debuggings, the java version settings in the project structure and compile in IDEA are a bit confusing, and I don't know how to adjust it for a while.
So I consulted my undergraduate classmate. His suggestion was that it might be a jdk problem. Currently jdk8 is relatively stable, and enterprises use it more. He suggested that I try jdk8.
After thinking about it again and again, I decided to push it all over again, reinstall jdk8 and idea2021.3 (used to use it), and finally after a series of operations, I saw such a prompt, and I felt that it was probably OK.
It finally worked!
This time, the solution to the problem is basically relying on reading materials and asking classmates. In the future, I will try to find a good solution and share it!
Excellent article sharing
- How IDEA configures maven
Detailed explanation of IDEA's maven configuration
2. The new version of IDEA cannot find the corresponding lombok version, how to manually import the lombok file
3. After IDEA installed the lombok plugin, adding dependencies is still popular
These are all very good articles that I think are written. These authors are very powerful. If you want the new version of IDEA to configure maven and lombok, it is enough to read these articles.