-
@Author : JCccc
-
@CreateTime : 2020/4/16
-
@Description :
**/
public interface TestAsyncService {
String testNotice(int[] taskDelayMill) throws InterruptedException, IOException;
}
对应的实现类impl,TestAsyncServiceImpl.class:
import com.jc.mytest.async.service.TestAsyncService;
import com.jc.mytest.util.DelayElement;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.text.DateFormat;
import java.util.Date;
import java.util.concurrent.DelayQueue;
/**
-
@Author : JCccc
-
@CreateTime : 2020/4/16
-
@Description :
**/
@Service
public class TestAsyncServiceImpl implements TestAsyncService {
@Async(“getEx