Basics
本节涵盖了 Spring Shell 的基础知识。在继续定义实际命令和选项之前,我们需要了解 Spring Shell 的一些基本概念。
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 Shell 应用程序之前,需要发生一些事情:
Essentially, a few things needs to happen before you have a working Spring Shell application:
-
Create a Spring Boot application.
-
Define commands and options.
-
Package the application.
-
Run the application, either interactively or non-interactively.
您可以获得一个完整的工作 Spring Shell 应用程序,而无需定义任何用户级命令,因为提供了一些基本的内置命令(如 help
和 history
)。
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.