idea使用mapstruct報錯,Internal error in the mapping processor
Posted on 2022-01-10 18:44 小強404 閱讀(1923) 評論(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>
浙公網安備 33010602011771號