运行我的测试时,它挂在对方法()的调用。难道我做错了什么?帮助!
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"beans.xml"})
@Transactional(rollbackFor = Exception.class)
public class Test {
@Test
public void test() {
itemUnderTestDao.method();
// ...
}
}
public class ItemUnderTestDao {
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void method() {
// ...
}
}
忘记上面的代码。我现在已经在http://www44.zippyshare.com/v/46865082/file.html上传了一个 Eclipse 项目(不包括 spring 等依赖项) 。非常感谢所有有关如何通过测试的输入!如果我有两个 sqlite 数据库和两个数据源,则测试通过...