<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>5.0-SNAPSHOT</version> <scope>test</scope></dependency>錯誤找不到神器 junit:junit:jar:5.0-快照 -> [幫助 1]來自智能的屏幕截圖嘗試:mvn 清理和安裝不起作用文件 ->清理緩存并重新啟動不起作用刪除 .m2 目錄不起作用。
1 回答

隔江千里
TA貢獻1906條經驗 獲得超10個贊
如果你想使用JUnit5,請使用下面的依賴關系 -
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.4.1</version>
<scope>test</scope>
</dependency>
而且,如果您想使用JUnit4,請使用下面的依賴關系 -
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
添加回答
舉報
0/150
提交
取消