Skip to content

Latest commit

 

History

History
executable file
·
49 lines (18 loc) · 1.36 KB

File metadata and controls

executable file
·
49 lines (18 loc) · 1.36 KB

MicroProfile generated Application

Tutorial

Read the tutorial here https://kodnito.com/posts/microprofile-health-check

Introduction

MicroProfile Starter has generated this MicroProfile application for you.

The generation of the executable jar file can be performed by issuing the following command

mvn clean package

This will create an executable jar file mp_health_example.jar within the target maven folder. This can be started by executing the following command

java -jar target/mp_health_example.jar

To launch the test page, open your browser at the following URL

http://localhost:8181/mp_health_example/index.html

Specification examples

By default, there is always the creation of a JAX-RS application class to define the path on which the JAX-RS endpoints are available.

Also, a simple Hello world endpoint is created, have a look at the class HelloController.

More information on MicroProfile can be found here

Health

The health status can be used to determine if the 'computing node' needs to be discarded/restarted or not. Specification here

The class ServiceHealthCheck contains an example of a custom check which can be integrated to health status checks of the instance. The index page contains a link to the status data.