Package org.springframework.boot.cli.command

Examples of org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors()


    for (Command command : commands) {
      runner.addCommand(command);
    }
    runner.setOptionCommands(HelpCommand.class, VersionCommand.class);

    int exitCode = runner.runAndHandleErrors(args);
    handleRunnerExitCode(runner, exitCode);
  }

  protected void handleRunnerExitCode(CommandRunner runner, int exitCode) {
    if (exitCode != 0) {
View Full Code Here


    runner.addCommand(new ShellCommand());
    runner.addCommand(new HintCommand(runner));
    runner.setOptionCommands(HelpCommand.class, VersionCommand.class);
    runner.setHiddenCommands(HintCommand.class);

    int exitCode = runner.runAndHandleErrors(args);
    if (exitCode != 0) {
      // If successful, leave it to run in case it's a server app
      System.exit(exitCode);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.