@RunWith(SpringRunner.class)中的SpringRunner.class一直引入不了,各位能幫忙看下么?
@RunWith(SpringRunner.class)中的SpringRunner.class一直引入不了,各位能幫忙看下么?,這些包確定都導(dǎo)入了,但感覺(jué)對(duì)解決這個(gè)問(wèn)題沒(méi)作用。。。
<dependency> ???<groupId>org.springframework.boot</groupId> ???<artifactId>spring-boot-starter-test</artifactId> ???<scope>test</scope> </dependency>
<dependency> ???<groupId>junit</groupId> ???<artifactId>junit</artifactId> ???<version>4.10</version> ???<!--<scope>test</scope>--> </dependency>
<dependency> ???<groupId>org.springframework.boot</groupId> ???<artifactId>spring-boot-test</artifactId> ???<version>2.0.3.RELEASE</version> ???<!--<scope>test</scope>--> </dependency>
2020-03-21
我遇到到的是同樣的問(wèn)題,后來(lái)我把新建項(xiàng)目時(shí)自帶的測(cè)試依賴(lài)注釋?zhuān)瑩Q成下面這個(gè)就解決了。
2018-11-23
找到spring-test.jar,試試SpringRunner.class能不能打開(kāi),不行的話就把本地倉(cāng)庫(kù)對(duì)應(yīng)的spring-test刪掉重新下。我的是這么解決的。
2018-07-15
項(xiàng)目上右鍵->Maven->Reimport,重新導(dǎo)包試試