Why your shared libraries are ill - and how to cure them
summary
Practical checklist for building reusable Java libs with Spring Boot: avoid putting domain logic in the shared artifact, split functionality into small modules and a parent POM/BOM to control transitive versions, publish scoped starters and multimodule projects, prefer factories/builders and conditional beans over inheritance, use type‑safe immutable properties, add integration/regression tests and a fake consumer, and automate updates with Renovate or OpenRewrite. Real-world scale: used across 30 teams and 200 microservices.
AI-written summary · about
chapters (10)
- 0:00Shared libraries overview
- 3:03Sharing code conflicts
- 10:44Five habits for healthy libraries
- 14:58Avoid god libraries
- 23:41Encapsulation and SOLID
- 28:42Estimating shared library use
- 42:39Summary: shared library design
- 43:11Q&A: parent POMs
- 45:31Q&A: bug fixes
- 46:38Q&A: extract to microservices
related talks
45mCode Once, Use Everywhere: Building Shared Libraries for Multiple Projects
45mCode Once, Use Everywhere: Building a Shared Module used by Multiple Projects
50mGrowing Spring-based commons, lessons learned
54mAvoiding a Shared Library Nightmare
52mSpring Recipes: A Collection of Common-Sense Solutions
43mLibrary Developer Confidential
56mBuilding a Framework on top of Spring Boot
46mModular Applications with Spring
