The wizard needs ask few parameters one after the other. eg: name then address then email then passwd and finally send test mail. If the send fails the wizard should start again. How can we implement this wizard.
2 Answers
Spring Shell is not really meant for "interactive, wizard style" programs like you describe. Rather "command-line style" applications where the user has the opportunity to provide the option values he knows about.
That being said, there is nothing stopping you from reading console input inside your command implementation. If this feature is the only aim of your program (i.e. you're not benefiting from more "classical" Spring Shell commands in the rest of the application), I would strongly advise to reconsider the use of Spring Shell altogether.

- 1,997
- 2
- 12
- 14
Spring Shell 3.0 recently went GA: https://spring.io/projects/spring-shell
Spring Shell does support wizard style console applications since version 2.1.0.
Checkout "Component Flow"
Starting from version 2.1.x, a new component model provides an easier way to create higher-level user interaction for the usual use cases, such as asking for input in various forms. These usually are just plain text input or choosing something from a list.

- 3,722
- 2
- 27
- 29