Creating Java Mature Microservice with JPA

Last updated: 2025-09-14

This section shows how to create a Mature REST Microservice API’s in no-time.

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-tutorial.adoc - include::inc/mature-service/pom.xml[]

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

  1. Create 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-tutorial.adoc - include::inc/mature-service/src/main/java/com/app/person/Model.java[]
  1. Create Service class as REST service at src/main/java/com/app/person/Service.java, such as the following:

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

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

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

mature service

The available end-points are:

Now, you can test the Microservice with your preferred API client such as Talend or PostMan.

To call the this Microservice from Java client, you can follow this - Create Mature Microservice Client

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