Top "Dependency-injection" questions

A design pattern to reduce coupling between components, by dynamically injecting into a software component dependencies that it needs to function.

How do I pass values to the constructor on my wcf service?

I would like to pass values into the constructor on the class that implements my service. However ServiceHost only lets …

wcf dependency-injection factory-pattern
No implementation was bound - Java Guice

Novice here trying to use a dummy Java Facebook app that uses Guice to inject a database dependency into the …

java dependency-injection annotations guice
I don't understand the use of $inject in controllers

I am totally confused about inject in Angular. I do not know where to use it and why. Is it …

javascript angularjs dependency-injection
how to unit test asp.net core application with constructor dependency injection

I have a asp.net core application that uses dependency injection defined in the startup.cs class of the application: …

c# unit-testing asp.net-core testing dependency-injection
How to inject the @request into a service?

When I try to inject the @request into any of my services, I get this exception: ScopeWideningInjectionException: Scope Widening Injection …

symfony service dependency-injection
How to inject a repository into a service in Symfony?

I need to inject two objects into ImageService. One of them is an instance of Repository/ImageRepository, which I get …

php symfony dependency-injection
ContextLoaderListener or not?

A standard spring web application (created by Roo or "Spring MVC Project" Template) create a web.xml with ContextLoaderListener and …

java spring servlets dependency-injection
How to use DI container when OwinStartup

It's a Web API 2 project. When I implement DI using Ninject, I got an error message An error occurred when …

c# asp.net-web-api dependency-injection ninject owin
Configuring Ninject with Asp.Net MVC & Web Api

i have setup my project with Ninject IoC. My project has regular Asp.Net MVC controllers and Web Api controllers. …

asp.net asp.net-mvc dependency-injection ninject repository-pattern
Injecting a Spring dependency into a JPA EntityListener

I am trying to inject a Spring dependency into an JPA EntityListener. Here is my listener class: @Configurable(autowire = Autowire.…

spring jpa dependency-injection spring-roo entitylisteners