繁体   English   中英

Intellij没有看到MapStruct生成的类

[英]Intellij doesn't see the generated class by MapStruct

当我在spring-boot使用MapStruct ,它会生成一个impl class并且我想访问该文件以在单元测试中导入,但intellij却看不到它

@SpringBootTest(classes={OrderMapperImpl.class})

我有错误

Can't find a symbol OrderMapperImpl

您可以通过右键单击目录target/generated-sources/annotations > Mark directory as... > Generated Sources Root来告诉IntelliJ将mapstruct生成的类作为源文件。

如果配置了另一个输出路径,则需要选择该路径。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM