ApplicationEvents.InjectorBuilder,
InjectorBuilder
.withModules(new MyApplicationModule)
.forEachElement(new BindingTracingVisitor())
.createInjector();
create method
when creating the object for the first time.InjectorBuilder insteadElement binding
To use with InjectorBuilder
InjectorBuilder
.fromModule(new MyApplicationModule)
.forEachElement(new BindingTracingVisitor())
.createInjector();
Scope that enables lazy singletons@PreDestroy and @PostConstruct as well as injector lifecycle hooks via the
LifecycleListener API.Properties object.LifecycleListeners and unblock awaitTermination.Providers that which to enforce singleton semantics
for a type.