此为父文章下的链接资源
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class ServiceTest {
@Autowired
private ItemService itemService;
@Test
public void test1(){
List<Item> itemList = itemService.findAllItem();
for (Item item : itemList) {
System.out.println(item);
}
}
}
网友评论