您的位置:首页 > 其它

注解测试

2016-01-15 09:49 288 查看
注解测试

配制文件要放到测试的资源文件当中

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath*:spring/data-knet.xml","classpath*:spring/applicationContext.xml"})
public class DatajunitTest extends AbstractJUnit4SpringContextTests{
@Resource
private IKnetService knetService;

@Test
public void aa(){
knetService.test();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: