Type: New Feature
Affects Version/s: 1.1.0
Fix Version/s: None
Spring Shell's AbstractShell's handleExecutionResult method logs the toString() output of a command result.
Therefore for a command to support outputting multiple formats of the same result, the options include:
- Override the result instance's toString() method with switch logic
- Write multiple commands with different return types
A more preferable solution would to be separate the command result from the presentation format.
A suggested solution is to, like @CliOption, provide an annotation denoting the command input that may be used to specify an output. Then, Spring Type Conversion could piggyback off Spring Shell's type conversion to apply a transformation on the command result.