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
The above command will generate the following output −
?[1mSpring Boot?[m?[2m (v1.5.8.RELEASE)?[m Hit TAB to complete. Type 'help' and hit RETURN for help, and 'exit' to quit.
In this section, we will learn how to run commands in Shell. Type the following and see the output −
version Spring CLI v1.5.8.RELEASE
You can press tab to auto complete the commands and type exit to finish the shell console.
Let us now learn how to test the application in shell. Type the following line of code and see the output −
E:\Test\FirstApplication>spring shell ?[1mSpring Boot?[m?[2m (v1.5.8.RELEASE)?[m Hit TAB to complete. Type 'help' and hit RETURN for help, and 'exit' to quit. $ test FirstApplication.groovy TestFirstApplication.groovy . Time: 0.347 OK (1 test) $ exit E:\Test\FirstApplication>