Skip to content

Instantly share code, notes, and snippets.

@chathurangat
Created November 13, 2017 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chathurangat/edb31c7bd6c646fd082ca172559c2efc to your computer and use it in GitHub Desktop.
Save chathurangat/edb31c7bd6c646fd082ca172559c2efc to your computer and use it in GitHub Desktop.
package com.springbootdev.samples.springbootasynctask.worker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@Component
public class NonAsyncWorker
{
private static final Logger LOGGER = LoggerFactory.getLogger(NonAsyncWorker.class);
public void execute()
{
LOGGER.info("NonAsyncWorker : current thread [" + Thread.currentThread().getName() + "]");
try {
Thread.sleep(3000);
} catch (InterruptedException ex) {
LOGGER.info(" sleeping thread interrupted ");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment