idea版本:
IntelliJ IDEA 2021.1.1 (Ultimate Edition)
Build #IU-211.7142.45, built on April 30, 2021
lombok版本
问题排查1.18.16
lombok的相关issue:https://github.com/projectlombok/lombok/issues/2592
解决办法IntelliJ is now wrapping the ProcessingEnvironment in a Proxy、This lead to a problem for us at MapStruct (mapstruct/mapstruct#2215)、While trying to fix that and testing with our examples I realized that our examples with Lombok are not compiling anymore.
大致意思是,IntelliJ新版本在 ProcessingEnvironement 预编译的时候是以代理的方式来执行的,不再是直接 javac方式,所有 lombok依赖的 annotation processors
在这增加参数: -Djps.track.ap.dependencies=false
就能正常处理 lombok注解了,
同时提示
java: JPS incremental annotation processing is disabled、Compilation results on partial recompilation may be inaccurate. Use build process "jps.track.ap.dependencies" VM flag to enable/disable incremental annotation processing environment.