[bs-55] Add strategy for setting system exit code

* Added ExitCodeGenerator and SpringApplication.exit
convenience method
* User can add bean of type ExitCodeGenerator or supply
one in the call to exit()

[Fixes #48475971]
This commit is contained in:
Dave Syer
2013-05-01 11:17:27 +01:00
parent 4d372bcc25
commit 30087cf6b9
11 changed files with 400 additions and 12 deletions

View File

@@ -45,7 +45,7 @@ public class SimpleBootstrapApplicationTests {
}
@Test
public void testCommandLoneOverrides() throws Exception {
public void testCommandLineOverrides() throws Exception {
SimpleBootstrapApplication.main(new String[] { "--name=Gordon" });
String output = getOutput();
assertTrue("Wrong output: " + output, output.contains("Hello Gordon"));