在Spring Shell 2中命令颜色 [英] Commands color in spring shell 2

查看:181
本文介绍了在Spring Shell 2中命令颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SPRING SHELL 2中,默认的不正确的命令错误输出的颜色为红色.可以为这些目的定义自定义颜色吗?

In SPRING SHELL 2 the default incorrect command and error output colors are red. Is it possible to define custom colors for these purposes?

谢谢!

推荐答案

ThrowableResultHandler处理命令执行最终引发异常时发生的情况,该实现使用RED显示文字.

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.

这篇关于在Spring Shell 2中命令颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆