Spring Boot "fat" JAR: Thin parts of a thick artifact

Day 2 /  / Track 2  /  RU

One of the most famous features of Spring Boot is packaging an entire application in the so-called "fat" JAR that "just runs". It really works and is sufficient in many cases. But if you don't believe in magic and/or are having problems deploying a fat JAR, then it's time for you to understand how this feature works.

And then it turns out that "just runs" is far from free: there are restrictions on loading classes, questions about launch speed, conflicts with built-in JDK utilities, differences in dev/test/prod modes, and sometimes the use of this feature is unnecessary at all.

We will dig into these and other fine points of the "fat" JAR in the talk. We'll look at its design and understand in which cases it's a good solution and when it's better to avoid using it (and what to choose instead). We'll also pay special attention to deployment in containers.

The talk is aimed to practicing engineers delivering Spring Boot applications to production.

Download presentation


Vladimir Plizga

Since his school days Vladimir was enthusiastic about programming and from then on has managed to code everything: from Soviet programmable calculators to modern CNC tools in production. For the last 8+ years he has been involved in Java backend development of Internet banking at CFT (Center of Financial Technologies). Constantly bothers with ideas about optimization of day-to-day tasks in software development and testing, nurtures solutions for them while jogging or swimming and then puts them into life, experimenting shamelessly on his colleagues. Periodically writes articles and makes talks on Java as well as takes part in organizing SnowOne – Siberian community-driven Java conference.

Invited Experts

Andrey Belyaev

Developer Advocate at Haulmont. Andrey started working closely with Java in 2006. He worked for a long time in outsourcing, where he tried himself in almost all roles, except, perhaps, a designer. He was a developer, team leader, PM, and architect. Andrey is currently working on the CUBA framework at Haulmont, making RnD and representing the company at various events.

Andrei Kogun

Andrei has been working in IT for more than 15 years, head of the Java developers at KROK. During his career he took part in many custom development projects, mainly e-document flow systems and business processes automatization for several big Russian companies as a senior developer and an architect. At the universities of Moscow, he delivers lectures in development basics with the use of Java technologies. Organizer and leader of Moscow Java developers community.