Demo: first Spring Boot app from Initializr to running endpoint
On This Lesson 3 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
go from nothing to a running app answering /actuator/health; prepares JNR-008-LAB1.
Draft outline details
Step by step
- Open Initializr; pick Maven, Java, current Boot; name it
shop-api. - Add Spring Web, Validation, Actuator. Download and unzip; open in the IDE.
- Planned mistake: add five extra starters "just in case" and watch startup grow and fail on a missing database setting. Fix: remove everything you do not need.
- Run
./mvnw spring-boot:runand read the startup log (port, "Started ShopApiApplication"). - Open
http://localhost:8080/actuator/healthand see{"status":"UP"}. - Stop the app with Ctrl+C.
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.