Java Modules meet Dependency Injection
summary
Shows how Java 9 Jigsaw and dependency injection actually interoperate: using Google Guice with explicit module-info exports/opens and selective opens for frameworks prevents accidental reflective access while keeping DI flexible. Demonstrates concrete patterns — provider methods for runtime wiring, default bindings in an application module, and when to open a package versus export an API. Includes a converted plugin/print-service example that isolates implementations behind module boundaries and keeps runtime service selection working without breaking encapsulation.
AI-written summary · about
chapters (7)
- 0:00Java Modules and DI intro
- 5:43Module system basics
- 10:18Reflection in modules
- 15:42Service implementation
- 22:00Dependency injection
- 28:35App bindings config
- 33:27Summary and Q&A
related talks
01h 02mJava 9 Modularity in Action
51mThe Java 9 Module System Beyond The Basics
53mModular Development with JDK 9
46mBeyond Jigsaw
51mModular Development with JDK 9
17mWhat's NOT New in Modular Java!
51mJava Modularity: Life After Java 9
01h 01mModels, Modules, Microservices – Better Domain Models with Java 9 Modules
