About 51 results
Open links in new tab
  1. What is the difference between @Inject and @Autowired in Spring ...

    Here is the piece of code: @Inject private CustomerOrderService customerOrderService; So what is the difference between using @Inject and @Autowired and would appreciate it if someone explained …

  2. javascript - Angular inject () vs DI - Stack Overflow

    May 29, 2025 · Both inject and constructor DI use (almost) the same code path under the hood, so there is no real difference. However, the updated style guide recommends using inject for multiple …

  3. inject() must be called from an injection context after upgrading ...

    Apr 8, 2024 · `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \`runInInjectionContext\`.`);

  4. java - Using @inject annotation - Stack Overflow

    Mar 7, 2016 · How to inject the dependency of a class in another class, if both of them are in different maven projects. I do not want to use the import statement as adding a import statement means I will …

  5. How to override inject () dependency from abstract base class in ...

    Aug 19, 2025 · // how do I inject FooBarService instead of BaseEditEventService<T> ? } What’s the correct way in Angular to let subclasses provide their own injected service when the base class uses …

  6. java - Dependency injection with @Inject - Stack Overflow

    Feb 27, 2021 · In the case of @Inject, some framework that you're using (Spring, CDI, Guice) looks for the annotation and, if present, executes some code that looks up and provides you with the …

  7. java - What is the difference between @RequiredArgsConstructor ...

    Sep 6, 2019 · Then you can inject that bean instance to the shop filed of Item class using constructor injection with the help of @RequiredArgsConstructor (onConstructor = @__ (@Inject)) But my …

  8. java - Как работает аннотация @Inject? - Stack Overflow на русском

    Я новичок только учу @Inject. Я не очень понимаю, как он работает. Вот у меня есть поле: @Injection private A a; И я могу использовать в своем коде a, хотя я не писал new. Правильно я …

  9. Moving @Inject (MAT_DIALOG_DATA) out of class constructors

    Sep 20, 2023 · You can use the new inject function also to inject injection tokens. i.e. private readonly data: string = inject(MAT_DIALOG_DATA);

  10. What is the difference between @Inject and @EJB - Stack Overflow

    May 10, 2016 · I'm currently learning the new Java EE 6 component models and am confused with the latest dependency injection mechanism. So here are my questions: 1) What is the difference …