Creating Simple Java Microservice Client
Last updated: 2025-09-14
Pre-Requisites:
-
Run the Microservice
This section shows how to create a simple REST Microservice service client in no-time.
Steps:
-
Create Maven project with pom.xml such as the following:
Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-service/java-simple-microservice-client-tutorial.adoc - include::inc/simple-service-client/pom.xml[]
If you are using Eclipse, be sure to refresh your project (select your project→ right click→ Maven→ Update Project) |
-
Create Person class as a model class at src/main/java/com/app/Person.java, such as the following:
Unresolved include directive in modules/6.x.x/pages/frameworks/jk-framework/jk-framework-service/java-simple-microservice-client-tutorial.adoc - include::inc/simple-service-client/src/main/java/com/app/Person.java[]
-
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-simple-microservice-client-tutorial.adoc - include::inc/simple-service-client/src/main/java/com/app/App.java[]
Run your App class, you should see something like this in your console:

Full example source-code can be found at https://github.com/smartapi-com/j-framework-microservice-client |