簡體   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