public class ShellCommandLineRunner extends Object implements org.springframework.boot.CommandLineRunner, org.springframework.context.ApplicationContextAware
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.
Constructor and Description |
---|
ShellCommandLineRunner() |
Modifier and Type | Method and Description |
---|---|
void |
run(String... args) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.