Building Microservices with Spring Boot Fat (Uber) Jar

| August 14, 2018

spring boot microservicesIn most of the minds, microservices is an approach to make a traditional monolithic system more structured, dividing it into logical components that correspond to different functional areas of application. Thus, acting as a microservice, each component becomes self-contained, easily scaled, maintained and even upgraded without affecting the overall system. Also, with microservice architecture, you can use a software written in different programming languages, including Java. Such freedom attracts but may frighten at the same time.

You can spend hours reading numerous articles in the net, regarding how to build microservices along with some boring examples. However theory without practice gets nowhere.

For a quick start, we have prepared a package with Maven and popular framework Spring Boot inside Java Engine node. It automates building a sample Java project as Fat (or so-called Uber) Jar to run it as a microservice.spring boot microservices tutorial

Installation of Spring Boot Fat (Uber) Jar Builder

To get started, log in to Jelastic dashboard, find the Spring Boot Fat Jar Builder in the Marketplace and click Install.building microservices

Or you can Import the required manifest using the link from GitHub: archetype spring boot

If required, change installation settings such as environment name or Git repository link to a custom Spring Boot project. Then press spring bootWhen the installation and building of the project are completed, a corresponding message appears. You still need to wait a few minutes for deploy to be finished (feel free to track the process in Tasks panel). In the default implementation, it is done under api/greeting to build microservices Afterwards, you can make sure, that application is up and running by pressing Open in browser button. spring boot uber jar

Running Multiple Microservices with Spring Boot Projects

You can use just created Maven node for building extra projects and deploying them to different environments to get a set of distributed microservices. spring boot microservices exampleFirst of all, create a separate environment with Java Engine.spring boot maven tutorialThen click Add Project next to the Maven node in the initial environment.spring boot mavenSpecify the name and link to the project, as well as choose the environment where it should be deployed. Additionally, you can activate automatic updates. Then confirm pressing Add + Deploy.spring boot maven plugin

More details on how to build and deploy Java applications can be found at the Maven node documentation.

In this way, you can easily build and deploy your Spring Boot based applications packaged in JAR files using Fat/Uber approach. Register and try out this implementation for your custom project to feel the benefits of microservices running in the cloud.

Related Articles

Spring Boot Thin Jar Builder for Running Java Microservices

How to Build and Deploy Vert.x Fat or Thin Microservice Application to the Cloud

Dropwizard Automatic Build and Deploy to Cloud-Native Microservices

Thorntail Fat, Thin and Skinny Approach for Running Microservice Applications