linpeilie / mapstruct-plus

MapStruct Plus is an enhancement to the MapStruct framework. It can automatically generate the transformation operation between two classes through an annotation, omitting the operation of defining the interface of MapStruct, makes Java type conversion easy and elegant.
https://mapstruct.plus/
Apache License 2.0
263 stars 20 forks source link

在未引入 mapstruct-plus-spring-boot-starter 依赖,无法正常编译 #93

Closed bbenchen closed 1 month ago

bbenchen commented 3 months ago

出现如下报错信息

[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?
[ERROR] Couldn't find type io.github.linpeilie.mapstruct.SpringContextUtils. Are you missing a dependency on your classpath?

在一些公共库中,我不需要 mapstruct-plus-spring-boot-starter,请问应该如果解决

linpeilie commented 3 months ago

暂时可以有两个解决方式:

  1. 使用 1.4.2 及以下版本
  2. 依赖 mapstruct-plus-spring-boot-starter,可以设置 scope 为 compile
github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 month ago

This issue was closed because it has been inactive for 14 days since being marked as stale.