Run spring boot application from command line

We can run spring boot application from command line by using below command on command line.

java -jar springbootapp.jar

We can also pass properties as arguments like port number.

java -jar springbootapp.jar \
    --server.port=8080 \
    --site.name=w3schools.com