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 properly register AutoFac in a basic MVC5.1 website?

AutoFac has recently been updated for MVC 5.1 but at the time of writing I find that the documentation is lacking (…

c# dependency-injection asp.net-mvc-5 autofac asp.net-mvc-5.1
Meaning of bean discovery mode annotated in CDI 1.1

I am migrating an application to Java EE 7 and would like to CDI 1.1. But I don't get the meaning of …

dependency-injection cdi java-ee-7
How to Inject Log4Net ILog implementations using Unity 2.0

Ultimately this has to do with setting up log4Net but generically the problem is not logging specific. Generically what …

c# dependency-injection unity-container log4net castle-windsor
Accessing Guice injector in its Module?

I am extending Guice's AbstractModule and inside of the extending class I need access to Guice's injector. It that possible, …

java dependency-injection guice
How to programmatically inject a Java CDI managed bean into a local variable in a (static) method

How can I programmatically inject a Java CDI 1.1+ managed bean into a local variable in a static method?

java dependency-injection cdi jboss-weld weld
Dagger: Inject @Named strings?

EDIT 2018-02-08: Sample project demonstrating how to do this at https://github.com/ravn/dagger2-named-string-inject-example - Note: the …

dependency-injection dagger
The requested service has not been registered ! AutoFac Dependency Injection

I am simply trying to use AutoFac to resolve dependencies but it throws exception such as The requested service 'ProductService' …

c# .net dependency-injection autofac
UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl

There are errors when using DI in Jersey Rest application: org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available …

java dependency-injection jersey glassfish hk2
How do I test Guice injections?

I gave to Google Guice the responsibility of wiring my objects. But, how can I test if the bindings are …

java testing dependency-injection guice
How do I work with Ninject in an ASP.NET MVC Web App?

I've created a new MVC Web application and I have references to Ninject.dll, Ninject.Web.Common.dll and Ninject.…

c# asp.net-mvc dependency-injection ninject