Skip to content

Instantly share code, notes, and snippets.

@vikasontech
Last active October 16, 2020 10:32
Show Gist options
  • Save vikasontech/a5e54ec339ddc674b0ddb5525c5014cf to your computer and use it in GitHub Desktop.
Save vikasontech/a5e54ec339ddc674b0ddb5525c5014cf to your computer and use it in GitHub Desktop.
GracefullshutdownApplication.kt
@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