Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个独特的要求,method2依赖于method1. 在method1中,我正在尝试生成一些订单数据,例如下订单并将与下订单关联的对象存储在对象列表中,并且生成的列表method1将作为method2.
method2
method1
但是现在,由于某些原因,有些订单下单可能会失败method1。发生这种情况时,method2执行将停止。
有没有办法绕过这个?即使method1执行失败,我们也应该method2与dependsOn注解一起继续执行。
dependsOn
您可以使用Test 注释的alwaysRun属性。