Master java skills

How to run springboot service from command line

First, go to the project root directory where pom.xml file is present. And run the below command

mvn spring-boot:run -Dspring-boot.run.arguments="--server.port=8081"

If the jar file is created, use the below command to run your springboot service on a specific port

java -jar AdditionService-0.0.1-SNAPSHOT.jar --server.port=8086