SpringBoot with Apache Maven

 

Create new project on https://start.spring.io


Clean cache on project before run program, by type command:

mvn clean (enter)


Compile program, type:

mvn compile (enter)


If get trouble and you want to skip the error while compiling, type:

mvn -Dmaven.test.skip=true compile (enter)


Pre-test install spring boot application, type:

mvn install -U


Run spring boot application, type:

mvn spring-boot:run (enter) , or

mvn -Dmaven.test.skip=true spring-boot:run (enter)


Run jar file by terminal, type:

java -jar spring-boot-1.0.jar application.properties (enter)


Build spring boot application to .jar file, type:

mvn package (enter), or

mvn -Dmaven.test.skip=true package (enter)


Result, your file .jar were in directory "target".

Comments