org.springframework.cloud.dataflow.shell

## Class ShellCommandLineRunner

- java.lang.Object
- - org.springframework.cloud.dataflow.shell.ShellCommandLineRunner

- All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.boot.CommandLineRunner, org.springframework.context.ApplicationContextAware

      public class ShellCommandLineRunner
      extends Object
      implements org.springframework.boot.CommandLineRunner, org.springframework.context.ApplicationContextAware

  This does basically the same thing as `Bootstrap` in Spring Shell, but using Spring Boot's `CommandLineRunner` as a callback hook for initialization, instead of squatting on the application's one `main(String[] args)` method.

  This configuration also uses Spring Boot to parse command line arguments instead of `SimpleShellCommandLineOptions.parseCommandLine(String[])`. This means that command line arguments use a different syntax than in Spring Shell. Key value pairs for arguments need to be passed with an equal sign as the separator rather than a space.

  Author:
    Josh Long, Mark Pollack

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShellCommandLineRunner()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `run(String... args)`
    `void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ShellCommandLineRunner

          public ShellCommandLineRunner()

  - ### Method Detail

    - #### setApplicationContext

          public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
                                     throws org.springframework.beans.BeansException

      Specified by:
        `setApplicationContext` in interface `org.springframework.context.ApplicationContextAware`
      Throws:
        `org.springframework.beans.BeansException`

    - #### run

          public void run(String... args)
                   throws Exception

      Specified by:
        `run` in interface `org.springframework.boot.CommandLineRunner`
      Throws:
        `Exception`

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.