Building a simple RESTful Java microservice using JAX-RS and
Explore the process of building a simple RESTful Java microservice using JAX-RS. Understand how to expose HTTP endpoints, handle requests, and return responses in a standardized way, making your Java applications accessible through REST APIs.
At a Glance
Learn how to create a REST service with JAX-RS, JSON-B, and Open Liberty.
You will learn how to build and test a simple REST service with JAX-RS and JSON-B, which will expose the JVM’s system properties. The REST service will respond to GET requests made to the http://localhost:9080/LibertyProject/System/properties URL.
The service responds to a GET request with a JSON representation of the system properties, where each property is a field in a JSON object like this:
{ "os.name":"Mac", "java.version": "1.8" }
The design of an HTTP API is essential when creating a web application. The REST API has become the go-to architectural style for building an HTTP API. The JAX-RS API offers functionality for creating, reading, updating, and deleting exposed resources. The JAX-RS API supports the creation of RESTful web services that come with desirable properties, such as performance, scalability, and modifiability.
Created by
The Open Liberty Project team
Related resource
Discover comprehensive developer information about Open Liberty.
There are no reviews yet.