@SneakyThrows
@Test
public void test(){
for (int i = 0; i < 5; i++) {
send();
}
}
@SneakyThrows
@Async
public void send(){
System.out.println(new Date());
Thread.sleep(3000);
}
日志就打印了两次,每次运行次数都有可能变化
添加回复
请先登陆