- Spring 5.0 Microservices(Second Edition)
- Rajesh R V
- 115字
- 2025-04-04 18:53:35
Bundle dependencies
As per this principle, all applications should bundle their dependencies along with the application bundle. With build tools such as Maven and Gradle, we explicitly manage dependencies in a Project Object Model (POM) or gradle file, and link them using a central build artifact repository such as Nexus or Archiva. This will ensure that the versions are managed correctly. The final executables will be packaged as a war file or an executable jar file embedding all dependencies:

In the context of microservices, this is one of the fundamental principles to be followed. Each microservices should bundle all required dependencies and execution libraries, such as HTTP listener and more, in the final executable bundle.