Programmatic
使用 CommandRegistration
的编程方式是使用 withOption
定义选项。
Programmatic way with CommandRegistration
is to use withOption
to define
an option.
Unresolved include directive in modules/ROOT/pages/options/basics/programmatic.adoc - include::../../../../../src/test/java/org/springframework/shell/docs/OptionSnippets.java[]
CommandRegistration
可以定义为一个 bean,也可以使用 CommandCatalog
手动注册。
CommandRegistration
can be defined as a bean or manually registered
with a CommandCatalog
.
查看以下部分以了解其他选项类型,即短格式。 |
Check below sections for other option types, i.e. short format. |