Spring Cloud CLI


Spring Boot CLI provides Spring Boot command line features for Spring Cloud. You can write Groovy scripts to run Spring Cloud component applications (e.g. @EnableEurekaServer). You can also easily do things like encryption and decryption to support Spring Cloud Config clients with secret configuration values. With the Launcher CLI you can launch services like Eureka, Zipkin, Config Server conveniently all at once from the command line (very useful at development time).

Running Spring Cloud Services in Development

The Launcher CLI can be used to run common services like Eureka, Config Server etc. from the command line. To list the available services you can do spring cloud --list, and to launch a default set of services just spring cloud. To choose the services to deploy, just list them on the command line, e.g.

$ spring cloud eureka configserver h2 kafka stubrunner zipkin

Writing Groovy Scripts and Running Applications

Spring Cloud CLI has support for most of the Spring Cloud declarative features, such as the @Enable* class of annotations. For example, here is a fully functional Eureka server

class Eureka {}

which you can run from the command line like this

$ spring run app.groovy

Spring Boot Config

To install, make sure you have Spring Boot CLI (2.0.0 or better):

$ spring version

E.g. for SDKMan users

$ sdk install springboot 2.2.0.BUILD-SNAPSHOT
$ sdk use springboot 2.2.0.BUILD-SNAPSHOT

and install the Spring Cloud plugin

$ mvn install
$ spring install
Spring Initializr

Quickstart Your Project

Bootstrap your application with Spring Initializr.


Each Spring project has its own; it explains in great details how you can use project features and what you can achieve with them.
3.0.2 CURRENT GA Reference Doc.
3.1.0-RC1 PRE Reference Doc.
3.0.3-SNAPSHOT SNAPSHOT Reference Doc.
2.2.4.RELEASE GA Reference Doc.