Skip to content

mrazumova/demo-microprofile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Demo API (Microprofile & OpenLiberty)

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 demo.jar within the target maven folder. This can be started by executing the following command

java -jar target/demo.jar

Liberty Dev Mode

During development, you can use Liberty's development mode (dev mode) to code while observing and testing your changes on the fly. With the dev mode, you can code along and watch the change reflected in the running server right away; unit and integration tests are run on pressing Enter in the command terminal; you can attach a debugger to the running server at any time to step through your code.

mvn liberty:dev

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

http://localhost:9080/openapi/ui  

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.

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.

Open API

Exposes the information about your endpoints in the format of the OpenAPI v3 specification. Specification here

The index page contains a link to the OpenAPI information of your endpoints.

Open Tracing

Allow the participation in distributed tracing of your requests through various micro services. Specification here

To show this capability, you need to download Jaeger and run ./jaeger-all-in-one. Alternatively, you can download the docker image of all-in-one using docker pull jaegertracing/all-in-one:${version}, followed by running the docker image. Refer to Jaeger doc for more info.

Open http://localhost:16686/ to see the traces. You have to invoke your demo app endpoint for any traces to show on Jaeger UI.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages