How to run a spring boot application from command line?

Running spring boot application from command line is quite straight forward. Once we know about it is really easy. We can run spring boot application from command line in multiple ways.

Run using java -jar command

$ java -jar target/upokary-0.0.1-SNAPSHOT.jar

Run using Maven

$ mvn spring-boot:run

Run using Gradle

$ gradle bootRun
Share