我的理解是役纹,在setting文件中本地倉庫中找不到這個(gè)啟動(dòng)項(xiàng)的jar包蟀瞧,但是在.m2文件夾中也找不到孤澎,我自己翻了本地磁盤目錄里面確實(shí)沒有jar包届氢,就在pom文件中貼上依賴,idea自動(dòng)導(dǎo)入一下覆旭,就解決問題了
去mevan倉庫中退子,我貼一下鏈接
https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher/1.5.2
把下面這段貼入pom文件的依賴中,讓idea自動(dòng)導(dǎo)入依賴
<!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher -->
<dependency>
? ? <groupId>org.junit.platform</groupId>
? ? <artifactId>junit-platform-launcher</artifactId>
? ? <version>1.5.2</version>
? ? <scope>test</scope>
</dependency>
在測試類中@springboottest注解不管是上面還是下面添加注解@ExtendWith(SpringExtension.class)型将,運(yùn)行試一下絮供,應(yīng)該就沒有問題了。