美文网首页
SpingBoot测试

SpingBoot测试

作者: 刘彦青 | 来源:发表于2020-08-29 08:31 被阅读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"
        );
    }

}

相关文章

网友评论

      本文标题:SpingBoot测试

      本文链接:https://www.haomeiwen.com/subject/zpsdsktx.html