Annotation Interface Inject


Marks a dependency injection point for constructor, method, or field injection.

This annotation is used to identify injection points where the container should provide an instance of the requested type. It can be applied to:

  • Constructors
  • Methods
  • Fields

Example usage:

 public class MyService {
     private final Repository repository;

     @Inject
     public MyService(Repository repository) {
         this.repository = repository;
     }
 }
 
Since:
4.0.0
See Also: