Spring Boot Thin JAR Builder for Running Java Microservices
Let's try thinking thin — in this tutorial, we'll see how to use Spring Boot Thin JAR Builder to run Spring Boot microservices.
Join the DZone community and get the full member experience.Join For Free
Today, we'd like to continue the topic about building microservices and move from Fat (Uber) JAR to Thin JAR for Spring Boot projects. Thin JAR represents compiled and packaged application code (business logic) of the project together with the third-party libraries it depends on. Compared to Fat, it does not contain application server runtime by default, so the size of a Thin archive is much smaller. The runtime and dependencies are automatically downloaded during the first launch and stored locally in the ~/.m2/repository.
Installation of Spring Boot Thin JAR Builder
Get started by accessing the Jelastic dashboard. Find the . Spring Boot Thin JAR Builder in the Marketplace and click Install.
Or, you can import the required manifest from GitHub.
If required, change the installation settings, such as environment name or Git repository link, to a custom Spring Boot project. Then press "install."
When the installation and building of the project are completed, a corresponding message appears. You still need to wait a few minutes for the deploy to be finished (feel free to track the process in context in the Tasks panel). In the default implementation, the deployment is done under
In a few minutes, you can make sure that application is up and running by pressing "Open in browser."
The topology for Spring Boot Thin looks as in the picture below.
Feel free to run as many microservices as required for your project without any complexity while building them. In the upcoming articles, we'll cover the steps of getting Fat, Thin, or Skinny JAR files for Thorntail, Vert.x, and DropWizard applications. Stay tuned and get more benefits from microservice architecture.
Published at DZone with permission of Tetiana Fydorenchyk, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.