# Installing the Spring Boot CLI
The Spring Boot CLI (opens new window) allows you to easily create and work with Spring Boot applications from the command-line.
# Install on Mac OSX with HomeBrew
$ brew tap pivotal/tap $ brew install springboot
# Manual Installation
See the download page (opens new window) to manually download and unpack the latest version, or follow the links below:
# Install on Mac OSX with MacPorts
$ sudo port install spring-boot-cli
# Install on any OS with SDKMAN!
SDKMAN! (opens new window) is the Software Development Kit Manager for Java. It can be used to install and manage versions of the Spring Boot CLI as well as Java, Maven, Gradle, and more.
$ sdk install springboot
Once installed, the Spring Boot CLI can be run using the
To get command-line help:
$ spring help
To create and run your first Spring Boot Project:
$ spring init my-app $ cd my-app $ spring run my-app
Open your browser to
$ open http://localhost:8080
You'll get the whitelabel error page because you haven't yet added any resources to your application, but you're all ready to go with just the following files:
my-app/ ├── mvnw ├── mvnw.cmd ├── pom.xml └── src/ ├── main/ │ ├── java/ │ │ └── com/ │ │ └── example/ │ │ └── DemoApplication.java │ └── resources/ │ └── application.properties └── test/ └── java/ └── com/ └── example/ └── DemoApplicationTests.java
mvnw.cmd- Maven wrapper scripts that will download and install Maven (if necessary) on the first use.
pom.xml- The Maven project definition
DemoApplication.java- the main class that launches your Spring Boot application.
application.properties- A file for externalized configuration properties. (Can also be given a
DemoApplicationTests.java- A unit test that validates initialization of the Spring Boot application context.