SpingBoot测试
2020-08-29 本文已影响0人
刘彦青
引入依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.1.6.RELEASE</version>
<scope>test</scope>
</dependency>
@RunWith(value = SpringRunner.class)
@SpringBootTest(classes = 启动类.class)
@ActiveProfiles("dev")
public class ApplicationTest {
@Before
public void init(){
System.out.println(
"init"
);
}
}