pom中导入lombok插件及依赖后,
maven执行compile报错,提示找不到get/set方法,原因是和mapstruct冲突。
解决方法:去掉annotationProcessorPaths节点就可以了
由如下pom.xml配置
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
version3.6.1/version
configuration
source1.8/source !-- or higher, depending on your project --
target1.8/target !-- or higher, depending on your project --
annotationProcessorPaths
path
groupIdorg.mapstruct/groupId
artifactIdmapstruct-processor/artifactId
version${org.mapstruct.version}/version
/path
/annotationProcessorPaths
/configuration
/plugin
改为如下配置
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
version3.7.0/version
configuration
encodingUTF-8/encoding
source1.8/source !-- or higher, depending on your project --
target1.8/target !-- or higher, depending on your project --
/configuration
/plugin
就OK了