Example: spring-guice
Guice and Spring are major Dependency Injection (DI) frameworks in Java. This example demonstrates how to apply Spring-based injection logic to Guice-based applications by leveraging spring-guice.
In short, spring-guice enables you to build an injector that mixes Spring and Guice module as follows:
AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(SpringAppConfig.class);
Injector injector = Guice.createInjector(new SpringModule(context), new GuiceModule());
GuiceApp app = injector.getInstance(GuiceApp.class);
Read "Cross-Framework Dependency Injection with spring-guice" for the details.
References: