Details

    • 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:
      None
    • Last commented by a User:
      true

      Description

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

      https://github.com/square/Dagger

      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.

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

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