Spring Shell 3.1.6中的自定义帮助命令

svdrlsy4  于 2024-01-05  发布在  Spring
关注(0)|答案(1)|浏览(135)

我已经构建了一个spring-shell应用程序,我想自定义内置的help命令。目前它看起来像这样:

  1. shell:>help help
  2. NAME
  3. help - Display help about available commands
  4. SYNOPSIS
  5. help --command String[] --help
  6. OPTIONS
  7. --command or -C String[]
  8. The command to obtain help for.
  9. [Optional]
  10. --help or -h
  11. help for help
  12. [Optional]

字符串
我想自定义它,使它看起来像这样,例如添加帮助部分。

  1. shell:>help help
  2. HELP email: [email protected]
  3. Slack: https://slckchannel
  4. NAME
  5. help - Display help about available commands
  6. SYNOPSIS
  7. help --command String[] --help
  8. OPTIONS
  9. --command or -C String[]
  10. The command to obtain help for.
  11. [Optional]
  12. --help or -h
  13. help for help
  14. [Optional]


一直在谷歌搜索,但还没有找到解决方案,有人有一个伟大的想法?
--安迪

kqhtkvqz

kqhtkvqz1#

我根据自己的喜好修改了templates目录下的stg文件,这样就解决了问题

相关问题