[Protest] Perfectly solve the error of Library source does not match the bytecode generated by Lombok plugin under IDEA

Writing project when it came to a question: Library source does not match the bytecode XXX
then found himself looking for most of the solutions are not the solution to see of the more cold heart
part of the solution is to empty the cache the next test and no use
some solution is to use Gradle I managed it with Maven, which is not very suitable.
Finally,
I tried to solve it by myself. Since the problem has been solved, I ca n’t reproduce it, so I ca n’t take a screenshot to describe it with text:

1. Uninstall the Lombok plugin in IDEA

File-Settings-Plugins search for Lombok and uninstall
Insert picture description here

2. Go to the error class (that is, the class with a red prompt above) Click Show diff to open a comparison window

Insert picture description here
(This picture is just for my reference)

3. Then a window will pop up to compare and copy the two files, 报错的该依赖包的路径and then enter the directory to delete the error file

Insert picture description here
(This is the catalog of the class I reported is for reference only)

There .jarand .jar.sha1these two files with the same name deleted unless they can be assured backup

For me it chestnuts being given source file is spring-data-commons-2.2.6.RELEASE
I will be spring-data-commons-2.2.6.RELEASE-Sources. JAR and spring-data-commons-2.2.6. RELEASE-sources.jar. Sha1 deleted

4. Reload Maven

Insert picture description here

problem solved

Insert picture description here


Published 185 original articles · praised 6 · 690,000 views

Guess you like

Origin blog.csdn.net/Piconjo/article/details/105468577