Spring boot配置Junit

来源:互联网 发布:mac book复制粘贴 编辑:程序博客网 时间:2024/05/16 15:54

加入依赖包:

spring-boot-starter-test


在Junit类加上

@RunWith(SpringJUnit4ClassRunner.class)

@SpringBootTest(classes = {Application.class})


Application.class是你系统定义的启动Application

0 0
原创粉丝点击