Chapter 11: Leveraging CDI Beans to Manage Ports and Use Cases
Quarkus provides its own dependency injection solution called Quarkus DI. It stems from the Contexts and Dependency Injection (CDI) for Java 2.0 specification. We employ CDI to delegate the responsibility to provide object instances to an external dependency and manage their life cycle across the application. Several dependency injection solutions in the market take such responsibility. Quarkus DI is one of them.
The value of using a dependency injection mechanism is that we no longer need to worry about how and when to provide an object instance. A dependency injection solution enables us to automatically create and provide objects as dependencies in classes that declare a dependency ...
Get Designing Hexagonal Architecture with Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.