idea使用mapstruct报错,Internal error in the mapping processor
Posted on 2022-01-10 18:44 小强404 阅读(1726) 评论(1) 编辑 收藏 举报错误信息如下:
java: Internal error in the mapping processor: java.lang.NullPointerException at org.ma...
修改方式:
升级mapstruct到最新版本,排除swagger2中的依赖。大致如下:
我的环境:idea:2021.02
<mapstruct.version>1.4.2.Final</mapstruct.version>
<dependency> <groupId>io.swagger</groupId> <artifactId>swagger-annotations</artifactId> <version>1.5.22</version> <exclusions> <exclusion> <groupId>org.mapstruct</groupId> <artifactId>mapstruct</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct</artifactId> <version>${mapstruct.version}</version> </dependency> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-jdk8</artifactId> <version>${mapstruct.version}</version> </dependency> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${mapstruct.version}</version> <scope>provided</scope> </dependency>