spring系列:七、整合junit

spring 整合junit

@RunWith(SpringJUnit4ClassRunner.class)   // spring 整合junit 4
@ContextConfiguration(locations = "classpath:applicationContext.xml")  // applicationContext.xml的位置
public class AspectJAopDepTest {

    @Autowired
    private UserService userService;

    @Test
    public void test01() {
        userService.login();
    }

}
发布了48 篇原创文章 · 获赞 1 · 访问量 1049

猜你喜欢

转载自blog.csdn.net/laonxs/article/details/104998874