【发布时间】:2018-11-25 11:46:00
【问题描述】:
当我在spring-boot 中使用MapStruct 时,它会生成一个impl class,我想访问该文件以在单元测试中导入,但intellij 看不到它
@SpringBootTest(classes={OrderMapperImpl.class})
我得到了错误
Can't find a symbol OrderMapperImpl
【问题讨论】:
-
你检查this相关问题了吗。
-
是的,它不起作用,因为 intellij 无法识别 OrderMapperImpl,因为它是生成的类
-
将生成的类文件夹添加到项目源中。
-
我该怎么做?
-
pom 声明的外观如何以及您使用的是哪个 IntelliJ 版本?
标签: java spring-boot spring-boot-test mapstruct