Building and Running from Command-Line

The pom.xml file is a basic Maven build script for creating your microservice as an executable uber-jar.

The easiest way to build your microservice is to run the following from the project root.

mvn clean install

Your target directory should now contain the following files:

- juneau-examples-rest-springboot-1.0.jar

To start from a command line, run the following command from inside your target directory:

java -jar juneau-examples-rest-springboot-1.0.jar

You should see the following console output:

. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.0.1.RELEASE) ... INFO: Tomcat started on port(s): 8080 (http) with context path '' Dec 21, 2012 12:30:00 AM org.springframework.boot.StartupInfoLogger logStarted INFO: Started App in 1.999 seconds (JVM running for 2.999)