Spring Boot CLI - Using Shell


Advertisements


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 (v1.5.8.RELEASE)?[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 v1.5.8.RELEASE

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 −

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>


Advertisements