Last active
October 16, 2020 10:32
-
-
Save vikasontech/a5e54ec339ddc674b0ddb5525c5014cf to your computer and use it in GitHub Desktop.
GracefullshutdownApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
class LongPauseController (){ | |
@GetMapping("/test") | |
fun longPause(): ResponseEntity<String> { log.info("I AM STILL PROCESSING WILL TAKE AROUND 60 SECS. TO FINISH. PLEASE WAIT ....") | |
Thread.sleep(60 * 1000) | |
log.info("FINALLY! I AM DONE. YOU CAN SHUTDOWN NOW. :)") | |
return ResponseEntity.ok("Thank you for waiting.") | |
} | |
companion object { | |
private val log = LoggerFactory.getLogger(this::class.java) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment