For the latest stable version, please use Spring Cli 0.9.0!

Getting Started

Creating a new project is as simple as typing spring boot new my-app:

spring boot new my-app

The output is

Cloning project from https://github.com/rd-1-2022/rest-service
Created project in directory 'my-app'
If the CLI seems to be stuck at the cloning step, you might be hitting GitHub rate limiting. Use the spring github auth login command to authenticate.

You can now cd into the my-app directory and build and run the application, which is, by default, a simple web application with a single endpoint:

cd my-app
./mvnw spring-boot:run

Then, in another terminal windows, you can interact with the endpoint by using curl:

curl http://localhost:8080/greeting

The curl command returns the default 'Hello World' greeting:

{"id":1,"content":"Hello, World!"}

The README.adoc file in the new project contains more information on how the web applications works.

Next steps

The Creating New Projects section shows you how to create applications other than the default application.

The Adding To Existing Projects section shows you how to add additional applications into your current working project.