Behind the Scenes (=Magic) of Dependency Injection in Quarkus

Why the injection of @RequestScoped beans is in quarkus so fast?

The short answer is:


public HelloResource create(final CreationalContext creationalContext) {
    final HelloResource helloResource = new HelloResource();
    try {
        final InjectableReferenceProvider value = this.injectProviderSupplier1.get();
        helloResource.hello = (Hello)value.get((CreationalContext)CreationalContextImpl.child((InjectableReferenceProvider)value, creationalContext));
    }
    catch (RuntimeException ex) {
        throw new RuntimeException("Error injecting airhacks.Hello airhacks.HelloResource.hello", ex);
    }
    helloResource.initResource();
    return helloResource;
}

...and the 9 minutes explanation:

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License