top of page
Chirag Prajapati

Building Microservices with JHipster

Updated: Aug 6, 2024

JHipster (for Java Hipster) is an Open Source application generator, based on Yeoman. It is a development platform to generate, develop and deploy Spring Boot + Angular Web applications with tooling and configuration all set up for you.

Developers use JHipster to get their project started very quickly, with a full-stack application ready to run in production within a few minutes.

It can also create a microservice stack with support for Netflix OSS, Docker and Kubernetes (containers).


JHipster Microservice Architecture Overview

JHipster can generate classical, “monolithic” applications. Since JHipster 3.0, the generator can also provide a full microservice architecture. This architecture is a decoupling of the original “monolithic” application into three components: -

  1. The JHipster Registry, which acts as a central service registry and configuration hub for the whole architecture

  2. Microservices applications, which are small Spring Boot applications with no user interface.

  3. Gateway applications, which handle the front-end AngularJS code, and act as routers and load-balancers in front of the microservices applications.


Here is a brief about building a microservice with Jhipster.

Building a microservice with JHipster: -

Steps -

  1. Pre-requisites or Environment Setup

  2. Development Process

  3. Deployment Process


  1. Jhipster Environment Setup -

  • Install Java 11 and above

  • Install Node.js 

  • Install Jhipster using the following command

  • npm install -g generator-jhipster

  • Install Maven or Gradle depending on you. (optional step)

  • JHipster will automatically install the Maven Wrapper or the Gradle Wrapper for you.


2. Development Process: - Creating Microservice Application

  • Create an empty directory in which you will create your application.

  • Go to the newly created directory.

  • To auto-generate your JHipster application, type below command: - 

  • jhipster in command prompt

  • Answer the questions asked by the generator to create an application tailored to your needs,

  • If everything goes fine, application is generated

  • you can launch it using Maven 

  • (./mvnw on Linux/MacOS/Windows PowerShell, mvnw on Windows command prompt)

  • The application will be available on default http://localhost:8080

Default Jhipster Microservice applications are ready and run on browser, now you develop your application as per your requirements.


3. Deployment Process: -

Jhipster applications generate .jar files as an executable and this we deploy on any server like:- AWS ,Hostinger etc.


Conclusion

JHipster is a popular development platform and generator for building modern web applications and microservices architectures based on requirements. Jhipster has the capability to develop full stack applications (angular + spring boot). Jhipster has in-built functionality to generate entities (database table) using in-built tools.




11 views0 comments

Recent Posts

See All

Comments


bottom of page