我有一个包含以下依赖项的项目:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>还有这个类:
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = {MyApp.class})
@WebAppConfiguration
@org.springframework.boot.test.IntegrationTest
public class ServiceTest extends TestCase {
public void testAllNames() {
}
}但是我有这个编译错误:
Cannot resolve symbol 'IntegrationTest'
Cannot resolve symbol 'SpringApplicationConfiguration'发布于 2021-07-15 19:05:20
从spring boot 1.x开始,IntegrationTest就被弃用了。您可以改用SpringBootTest。
https://stackoverflow.com/questions/68392559
复制相似问题