Embedded servers and executable JARs
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
describe how the app runs as one file.
Planned topics
- The server (Tomcat by default) runs inside your app; you do not install one.
./mvnw packageproduces an executable "fat" JAR containing your code and libraries.- Run it with
java -jar target/shop-api-0.0.1-SNAPSHOT.jar. - Port and context path are settings, not install steps.
Draft outline details
Demonstration
./mvnw package, list target/, then java -jar ... and call /actuator/health.
Check your understanding
What do you need on the server to run the JAR?
Show answer
Only a Java runtime.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.