03: Spring Boot Web & Actuator Beginner Tutorial Step by Step

Step 1: Create a simple maven project using the maven “archetype” plugin.

Step 2: Import it as an “existing maven project” into eclipse.

Step 3: The pom.xml file to bring in the Spring boot dependencies & plugins.

Step 4: The “App.java” with a RESTful endpoint.

Step 5: Create a new “source folder” named “src/main/resources”.

Step 6: Create “application.properties” under “src/main/resources”.

Step 7: Build the jar (i.e uber jar) with

or

Step 8: Start the application with embedded tomcat.

Test with WizTools RESTClient

http://localhost:8080/myapp the endpoint that we built via “App.java”

Spring boot RESTful Web service

http://localhost:8080/health production ready endpoint created via spring boot starter actuator.

Spring boot starter actuator – health

http://localhost:8080/metrics production ready endpoint created via spring boot starter actuator.

http://localhost:8080/env production ready endpoint created via spring boot starter actuator.


Java Developer Interview Q&As

800+ Java Interview Q&As

Top