Creating Mature Java Microservice Client

Last updated: 2025-09-14

This section shows how to create a Mature REST Microservice service client in no-time.

Pre-Requisites:

  1. Create Mature Microservice

  2. Run the Microservice

Steps:

  1. Create Maven project such as the following:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-service/java-mature-microservice-client-tutorial.adoc - include::inc/mature-service-client/pom.xml[]

If you are using Eclipse, be sure to refresh your project (select your project→ right click→ Maven→ Update Project)

  1. Create config.properties in src/main/resources, as the following:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-service/java-mature-microservice-client-tutorial.adoc - include::inc/mature-service-client/src/main/resources/config.properties[]
  1. Create the Model class at src/main/java/com/app/person/Model.java, such as the following:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-service/java-mature-microservice-client-tutorial.adoc - include::inc/mature-service-client/src/main/java/com/app/person/Model.java[]
  1. Create ServiceClient class at src/main/java/com/app/person/ServiceClient.java as follows:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-service/java-mature-microservice-client-tutorial.adoc - include::inc/mature-service-client/src/main/java/com/app/person/ServiceClient.java[]
  1. Create App class at src/main/java/com/app/App.java for quick testing:

Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-service/java-mature-microservice-client-tutorial.adoc - include::inc/mature-service-client/src/main/java/com/app/App.java[]

Run your App class, you should see something like this in your console:

mature service client