@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={“classpath:spring/spring-dao.xml”})
public class UserTest {
@Resource(name=”userService”)
private IUserService userService;
@Test
public void testUserService(){
User user=userService.getUser();
System.out.println(user);
}
}
SpringJUnit4ClassRunne
最新推荐文章于 2022-02-16 15:46:40 发布