Skip to content

Instantly share code, notes, and snippets.


b1a9id/ Secret

Last active Jul 9, 2021
What would you like to do?
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.retry.annotation.Recover;
import org.springframework.retry.annotation.Retryable;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.b1a9idps.springasyncdemo.dto.request.AsyncRequest;
import com.b1a9idps.springasyncdemo.exception.FailedFileUploadException;
import com.b1a9idps.springasyncdemo.service.AsyncService;
public class AsyncServiceImpl implements AsyncService {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncServiceImpl.class);
public void save(AsyncRequest request) {"Start Async processing.(number = " + request.getNumber() + ")");
try {
Thread.sleep(5000);"Hi!.(number = " + request.getNumber() + ")");
} catch (InterruptedException e) {
LOGGER.error("thrown InterruptedException.");
}"End Async processing.(number = " + request.getNumber() + ")");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment