File tree Expand file tree Collapse file tree
spring-shell-core/src/main/java/org/springframework/shell/core/command/annotation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import java .lang .annotation .Target ;
2323
2424import org .springframework .aot .hint .annotation .Reflective ;
25+ import org .springframework .core .annotation .AliasFor ;
2526
2627/**
2728 * Annotation marking a method to be a shell command. The declaring class should be
3637@ Reflective
3738public @interface Command {
3839
40+ /**
41+ * Alias for {@link #description}. Allows using
42+ * {@code @Command("My command description")} as shorthand.
43+ */
44+ @ AliasFor (attribute = "description" )
45+ String value () default "" ;
46+
3947 /**
4048 * Define command as an array. Given that command should be {@code command1 sub1} it
4149 * can be defined as:
7381 * Define a command description.
7482 * @return the command description
7583 */
84+ @ AliasFor (attribute = "value" )
7685 String description () default "" ;
7786
7887 /**
You can’t perform that action at this time.
0 commit comments