Spring Boot is gaining much attention today. There are several ways to get started with Spring Boot. One of them is to use Spring Boot Command Line Interface (CLI). In this article, I’d like to show you how to install Spring Boot command line interface on Windows.

1. Prerequisites

  • Spring Boot CLI requires Java 6 or above in order to run.
  • JAVA_HOME environment variable should be set to a JDK

2. Install Spring Boot Command Line Interface on Windows

2.1. Download Spring Boot Command Line Interface

You can visit Spring Boot repository to download the Spring Boot CLI version that you desire by follow below link:

http://repo.spring.io/release/org/springframework/boot/spring-boot-cli

Currently, the latest version is: 1.4.0

So, we will try to download the Spring Boot CLI 1.4.0.

http://repo.spring.io/release/org/springframework/boot/spring-boot-cli/1.4.0.RELEASE/spring-boot-cli-1.4.0.RELEASE-bin.zip

Then unzip it to the folder that you want, for example: D:\Work\workspace\spring-1.4.0.RELEASE

2.2. Set SPRING_HOME environment variable.

2.2.1. In Windows 7 right click My Computer and select Properties > Advanced.
In Windows 8, Windows 10,  go to Control Panel > System > Advanced System Settings.

2.2.2. Under System Variables, click New

2.2.3. In the Variable Name field, enter SPRING_HOME

2.2.4. In the Variable Value field, enter your Spring Boot CLI path, for ex:

D:\Work\workspace\spring-1.4.0.RELEASE

Install Spring Boot Command Line Interface on Windows -SPRING_HOME environment variable

SPRING_HOME environment variable

2.2.5.Click OK

2.3. Add SPRING_HOME/bin to PATH environment variable.

2.3.1. Select the Path variable and click Edit button.

2.3.2. In the Variable Value field, append ;%SPRING_HOME%\bin to the end

Install Spring Boot Command Line Interface on Windows - Add SPRING_HOME\bin to the Path environment variable

Add SPRING_HOME\bin to the Path environment variable

2.3.3. Click OK and Apply Changes as prompted

3. Verify

To verify whether the Spring Boot CLI was installed successfully or not, we simply open Windows Command Prompt and issue below command:

The output should be:

4. Summary

We have tried to get started to install Spring Boot Command Line Interface on Windows. It’s pretty easy; however, I just wanted to have a comprehensive installation guide to get it installed quickly and simply. In next articles, we’ll practice some popular commands provided by Spring Boot CLI. If you’re looking for install Spring Boot CLI on Linux system like Ubuntu, CentOS, Fedora, you can refer to the following post: Install Spring Boot Command Line Interface on Linux

Here is another posts related to Spring Boot if you may be interested in:

How To Run A Spring Boot Application

How to Configure Logging in Spring Boot

Convert a Spring Boot JAR application to a WAR

JUnit 5 and Spring Boot Example

0 0 vote
Article Rating