public class ShellUtils extends Object
| Constructor and Description |
|---|
ShellUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
filteredArgsToShellCommands(ShellProperties shellProperties,
org.springframework.boot.ApplicationArguments args)
Gets a filtered list of args to pass to the command shell to be executed in non-interactive mode.
|
static boolean |
hasHelpOption(org.springframework.boot.ApplicationArguments args)
Checks if given application arguments contains any usual help option.
|
static String |
prettyPrintIfJson(String maybeJson) |
public static boolean hasHelpOption(org.springframework.boot.ApplicationArguments args)
args - the application argumentspublic static List<String> filteredArgsToShellCommands(ShellProperties shellProperties, org.springframework.boot.ApplicationArguments args)
If any help arg is specified returns a single element list containing 'help'.
Otherwise, returns a list containing the commands in all command files specified in the
ShellProperties.getCommandFile() 'spring.shell.commandFile'} property.
shellProperties - shell configuration propertiesargs - the application argumentsCopyright © 2024 Pivotal Software, Inc.. All rights reserved.