Interaction Mode

命令注册能够定义 InteractionMode,它用于根据 Shell 正在执行的模式隐藏命令。可以从 Interaction Mode 中找到更多有关此内容的信息。

你可以使用 CommandRegisration 定义它。

Unresolved include directive in modules/ROOT/pages/commands/interactionmode.adoc - include::../../../../src/test/java/org/springframework/shell/docs/CommandRegistrationInteractionModeSnippets.java[]

或使用 @ShellMethod

Unresolved include directive in modules/ROOT/pages/commands/interactionmode.adoc - include::../../../../src/test/java/org/springframework/shell/docs/CommandRegistrationInteractionModeSnippets.java[]