问题
In SPRING SHELL 2 the default incorrect command and error output colors are red. Is it possible to define custom colors for these purposes?
Thank you!
回答1:
What happens when execution of a command ends up throwing an exception is handled by ThrowableResultHandler
, whose implementation use RED
to display text.
If you want to customize this, just override that result handler.
来源:https://stackoverflow.com/questions/52187292/commands-color-in-spring-shell-2