• Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: Waiting for Triage
    • Component/s: Core:DI
    • Labels:
    • Last commented by a User:


      I recently had a look at a new Dependency Injection framework called Dagger from Jesse Wilson at Square.

      It has two cool features that I wish Spring had as well (will create a separate issue for the other feature). Dagger adds beans automatically to the application context (called ObjectGraph in Dagger) when a field or constructor is annotated with @Inject (Dagger doesn't support method injection). This means the bean itself doesn't need to be annotated at all. All the alternatives for this in Spring are not very appealing:

      (a) Using @Component leads to a dependency on the Spring API
      (b) Using @Named (without name) isn't very descriptive at all
      (c) Using @ManagedBean is awkward when not using JSF and requires one to add another dependency since it's not part of the JDK

      In short, it would be great if no annotation would be required.


        There are no comments yet on this issue.


          • Assignee:
            Chris Beams
            Thomas Oellrich
            Last updater:
            Chris Beams
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created:
              Days since last comment:
              1 year, 29 weeks, 1 day ago