In Chapter 1, Quick Start with Groovy, we got an initial glimpse of CRaSH (http://www.crashub.org/), the shell for Java apps. We took a quick tour of that application. In this section, we'll not only add CRaSH, but also write some custom commands.
First, we need to add
spring-boot-starter-remote-shell to the build file:
Now when we run our app, we will have a lot of out-of-the-box management features. However, the focus of this section is to create some custom commands and then see them in action.
Spring Boot Actuator will look in
classpath*:/crash/commands/ for any Groovy scripts. Let's write one!