springboot测试类注解

@RunWith(SpringRunner.class)
@SpringBootTest(classes = App.class)// 就是你springboot的启动类
public class IUserServiceTest {


@Autowired
private IUserService userService;

@Test
public void getById() {
System.out.println(userService.getById(6L));
}
}

posted on 2019-04-08 15:31  阿姨哥  阅读(5657)  评论(0编辑  收藏  举报

导航