Springbootcli 简明教程

Spring Boot CLI - Using Shell

Spring Boot CLI 提供了一个 Shell 界面来运行命令,我们可以在其中直接运行命令,如下所示。转到 E:\Test 文件夹,并键入以下命令。

Spring Boot CLI provides a Shell interface to run the commands in which we can directly run the commands as shown below. Go to E:\Test folder and type the following command.

E:/Test> spring shell

你将看到以下输出。

You will see the following output.

←[1mSpring Boot←[m←[2m (v2.6.3)←[m
Hit TAB to complete. Type 'help' and hit RETURN for help, and 'exit' to quit.
$

Running commands in Shell.

键入以下内容,并查看输出。

Type the following and see the output.

version
Spring CLI v2.6.3

你可以按 Tab 键自动完成命令,并键入 exit 完成 shell 控制台。

You can press tab to auto complete the commands and type exit to finish the shell console.

Testing the application in shell

键入以下内容,并查看输出。

Type the following and see the output.

$ exit
E:\Test\FirstApplication>