Commands color in spring shell 2

2019-08-20 06:22发布

问题:

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.