Top "Ioc-container" questions

In object oriented languages, an inversion of control container (ioc-container) can be used for configuring and managing objects in an application.

Declaring Spring Bean in Parent Context vs Child Context

I have a spring bean (dao) object which I instantiate in my ServletContext via the following xml: <bean id="…

security spring ioc-container servlets security-context
Register shutDownHook in web application

How we can registerShutdown hook in web application? Is there any whays to register it in web.xml or in …

java spring tomcat web ioc-container
Lightweight ioc-Container for Java?

Coming from .NET, I'm used to Ninject, that's a small simple ioc-container. Is there anything simple and lightweight for Java? …

java dependency-injection ioc-container
How is the Web API Controller's constructor called?

According to this article, a Controller should have a constructor that gets the interface to be implemented passed in, a …

c# asp.net-web-api controller ioc-container constructor-injection
Is it possible to use Dependency Injection with xUnit?

I have a test class with a constructor that needs an IService. public class ConsumerTests { private readonly IService _service; public …

unit-testing testing dependency-injection ioc-container xunit
Specify constructor for the Unity IoC container to use

I'm using the Unity IoC container for resolving my objects. However, I've run into an issue. When I have more …

c# .net unity-container ioc-container
Access or get Autofac Container inside a static class

I need to get or access to my IoC container in a static class. This is my (simplified) scenario: I …

c# dependency-injection autofac ioc-container static-class
Resolve instance with multiple constructors using unity

I'd like to create an instance of a class using unity where the class has two constructors with the same …

c# unity-container ioc-container
Castle Windsor: Auto-register types from one assembly that implement interfaces from another

I use Castle Windsor as my IoC container. I have an application that has a structure similar to the following: …

c# castle-windsor ioc-container fluent-interface
Is it better to create a singleton to access unity container or pass it through the application?

I am dipping my toe into using a IoC framework and I have choosen to use Unity. One of the …

c# unity-container ioc-container