Custom Spring Boot Exit Code with Exception mapping.

Maheshwar Ligade
Oct 6, 2020 · 3 min read

In this article, we will check how spring boot exit code works and How to create your own exit codes.

When you started spring boot application in your logs some times you have seen logs like " Process finished exit code 0 "

Maybe you have noticed or sometimes not noticed, but the above message is in the success scenario or Happy scenario whereas in the failure scenario you got to know something like "…exit code -1". This failure message you may be able to collect you haven't given much attention to this but I know…