Spring Boot for stand-alone, production-grade Spring-based Applications that you can run. 🏃
- Check your dependencies:
# Check for Java SDK > v1.8
java --version
As stated in the Spring CLI docs: Alternatively, you should set the JAVA_HOME environment variable to point to a suitable JDK
# Check for Maven > v3.3
mvn --version
- Download the Spring CLI distribution from the Spring software repository
# Navigate to the directory where you downloaded the Spring CLI
cd ~/Downloads
# Extract .zip file (make sure you update to your specific version downloaded)
jar xf spring-boot-cli-2.2.2.RELEASE-bin.zip
# Add environmental variables to your PATH
cd ~
ls -l .bash_profile
- Add environmental variable for the current user:
# Add <your-PATH> to Spring Boot CLI /bin folder to your .bash_profile
nano .bash_profile
# Add the following line to .bash_profile (for Windows, flip to backslash '\') e.g. "\Users\...\...\...\bin:$PATH")
export PATH="/Users/<your-user-name>/Downloads/spring-2.2.2.RELEASE/bin:$PATH"
# Now WRITE OUT, SAVE, and EXIT
Ctrl-O
'Enter'
Ctrl-X
- Refresh the Terminal and test your installation:
source .bash_profile
# Test your Spring CLI install
spring --version
- Happy Spring-ing! ⛲
A whole set of useful tasks!
- Discover a few commands with:
spring shell
- Run Groovy scripts directly from command line:
spring run <Spring-Groovy-ScriptName>
- Use Maven to build executable Java-Spring applications