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)); }}
相關文章
相關標籤/搜索