@Order(value=-100) public class ScriptShellRunner extends Object implements ShellRunner
ShellRunner
that looks for process arguments that start with @, which are then interpreted as
references to script files to run and exit.
Has higher precedence than NonInteractiveShellRunner
and InteractiveShellRunner
which gives it
top priority to run the shell if scripts are found.
Modifier and Type | Field and Description |
---|---|
static int |
PRECEDENCE
The precedence at which this runner is ordered by the DefaultApplicationRunner - which also controls
the order it is consulted on the ability to handle the current shell.
|
Constructor and Description |
---|
ScriptShellRunner(org.jline.reader.Parser parser,
Shell shell) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRun(org.springframework.boot.ApplicationArguments args)
Checks if a particular shell runner can execute.
|
void |
run(org.springframework.boot.ApplicationArguments args)
Execute application.
|
public static final int PRECEDENCE
public ScriptShellRunner(org.jline.reader.Parser parser, Shell shell)
public boolean canRun(org.springframework.boot.ApplicationArguments args)
ShellRunner
canRun
in interface ShellRunner
args
- the application argumentspublic void run(org.springframework.boot.ApplicationArguments args) throws Exception
ShellRunner
run
in interface ShellRunner
args
- the application argumetsException
- in errorsCopyright © 2024. All rights reserved.