[英]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.