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));
}
}
上一篇:MyBatis-Plus_通用service


下一篇:Spring - AOP