For the latest stable version, please use Spring Shell 3.3.3!spring-doc.cn

Flow Components

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.spring-doc.cn

Templates for built-in components are in the org/springframework/shell/component classpath.spring-doc.cn

Built-in components generally follow this logic:spring-doc.cn

  1. Enter a run loop for user input.spring-doc.cn

  2. Generate component-related context.spring-doc.cn

  3. Render the runtime status of a component state.spring-doc.cn

  4. Exit.spring-doc.cn

  5. Render the final status of a component state.spring-doc.cn

Flow gives better interface for defining the flow of components that are better suited for defining interactive command flows.