3. Basics

This section covers the basics of Spring Shell. Before going on to define actual commands and options, we need to go through some of the fundamental concepts of Spring Shell.spring-doc.cn

Essentially, a few things needs to happen before you have a working Spring Shell application:spring-doc.cn

You can get a full working Spring Shell application without defining any user-level commands as some basic built-in commands (such as help and history) are provided.spring-doc.cn

Throughout this documentation, we make references to configuring something by using annotations (mostly relates to use of @ShellMethod and @ShellOption) and to the programmatic way (which uses CommandRegistration).spring-doc.cn

The programmatic model is how things are actually registered, even if you use annotations. The @ShellMethod and @ShellOption annotations are a legacy feature that we do not yet want to remove. CommandRegistration is the new development model where new features are added. We are most likely going to replace existing annotations with something better, to support new features in a CommandRegistration model.spring-doc.cn