Addresses enhancement issue #25945

creates classes ExitingCommandLineRunner and ExitException

Comment From: pivotal-cla

@raqueru Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@raqueru Thank you for signing the Contributor License Agreement!

Comment From: philwebb

Thanks for the pull-request @raqueru, but I think we want to look at the exit code logic in general rather than adding new public APIs. Your code will be a handy reference for anyone looking into doing this themselves, but I don't think we want to include it into Spring Boot itself.

Comment From: raqueru

Thanks for the pull-request @raqueru, but I think we want to look at the exit code logic in general rather than adding new public APIs. Your code will be a handy reference for anyone looking into doing this themselves, but I don't think we want to include it into Spring Boot itself.

Sure! No problem, do you have any tips to solve the main problem so i can try it again?

Comment From: philwebb

@raqueru I'm afraid I don't have any good suggestions just yet. It's likely to take a bit of time to investigate, and since there's a workaround it's not a particularly high priority.