Most voted "dependency-injection" questions
Dependency Injection is a development standard that aims to reduce the coupling between components of an application by dynamically injecting the dependencies it needs to work rather than programmatically defining them.
Learn more…92 questions
Sort by count of
-
1
votes1
answer70
viewsAutofac. Dispose or not
There is a difference in performance or best practice between the two examples? Example1: private void Teste() { using (var scope = Container.BeginLifetimeScope()) {…
-
1
votes1
answer416
viewsInjection of MVC dependency
Galera I’m using dependency injection to use the Mock. I wonder if I need to create an interface for my Model and one for my Controller? Thank you
-
1
votes1
answer344
viewsNinject dependency injection for more than one web project
Hello, in an application I have a MVC web project and a Web API project, in the MVC project I already have the Ninject configured with the dependency injections and I would like to take advantage of…
asp.net-mvc dependency-injection asp.net-web-api ninjectasked 9 years, 3 months ago Edmar Munhoz 1,057 -
1
votes1
answer2928
viewsNo Qualifying bean of type found for dependency
I searched Stackoverflow and Stackoverflow in Portuguese but nothing guaranteed the solution to the problem. I have been through this problem several times but at the moment I do not find the…
java spring maven tomcat dependency-injectionasked 8 years, 11 months ago Giancarlo Abel Giulian 3,999 -
1
votes1
answer1120
viewsHow to inject dependencies with Weblogic 12.x. x?
What is the procedure to be able to inject dependencies using @Inject of javax.inject on the Weblogic 12.x. x server? I need to download Weld and place it on project dependencies? I noticed that…
-
1
votes1
answer671
viewsASP.NET CORE Dependency Injection
I have a situation that I don’t know how to solve. I have the following scenario: I have an ASP.NET CORE Webapi and a Class Library also in . NET CORE. Since the class library will be according to…
c# dependency-injection asp.net-core class-libraryasked 6 years, 7 months ago Vinícius Avansini 183 -
1
votes2
answers8286
viewsNo constructor without parameters has been defined for this object
I am building an ASP.NET MVC5 application using DDD and have separated my Ioc layer from my web application. In my controllers I have constructs with parameter to receive an instance of my service…
-
1
votes2
answers445
viewsDependency Injection - Two objects implementing the same interface
I have two objects from the Amazons3uploadservice classes and Databaseuploadservice and both implement the Uploadservice interface. The uploading class has the two objects injected by the Spring…
-
1
votes1
answer1071
viewsInjection of Depension with Ninject C#
I am developing an application that has 4 layers Dominio, Infra, Servico e Web When I have access to a route for example Home/Index he says that there is no constructor without parameters, my…
-
1
votes1
answer50
viewsIoc Laravel Conflict 5.3
I have the following codes: Chat Staff Service namespace Chat\Api\V1\Services\Chat; class ChatStaffService extends Service { private $chatService; public function __construct(ChatService…
-
1
votes1
answer43
viewsWhen to use void Inject on Dagger
Dagger, can someone give me a hand? I managed to do some 3 very simple projects always trying several to have new problems and learn more, but one part I’m kind of copying because I don’t…
-
1
votes1
answer392
viewsSimpleinjector: The Configuration is invalid. The type is directly or Indirectly Depending on itself
I have the following problem when applying the Simpleinjector container in a simple application: The configuration is invalid. The type BookAppService is directly or indirectly depending on itself.…
c# asp.net-mvc dependency-injection ioc simple-injectorasked 6 years, 10 months ago Matheus Daumas 37 -
1
votes0
answers95
viewsCreating an injector with Google Guice
I’m trying to use Google Guice in my application. So I created a Module by binding an interface with an implementation... public class ApplicationModule extends AbstractModule { @Override protected…
-
1
votes1
answer1105
viewsProblem Injecting a Service into the Controller: An unhandled Exception occurred while Processing the request
I’m getting error below when trying to inject a service into a controler. I already checked my configuration on Statup.Cs. Error: An unhandled Exception occurred while Processing the request.…
-
1
votes1
answer51
viewsWhere and when to decide which concrete class (which implements a given interface) should be instantiated?
Okay, this is the classic problem to be solved with the use of interfaces, right? Let’s take the example: I have a DLL that will be used by different companies, each with their bank and their Pessoa…
-
1
votes1
answer90
viewsHow to integrate Javafx with Springboot
I’m on the following case: I have an application developed with Spring Boot, and I am developing the front end with Javafx. It is a local application, not a web one. I can run the project, Spring…
-
0
votes0
answers175
viewsDependency injection of two or more classes implementing the same interface
The entire architecture of my system is based on addiction injection, where in my configureServices I configure the injections as follows services Addscoped(); However the need arose for me to have…
-
0
votes1
answer33
viewsClass Dependency Injection that I don’t have access to
Hello, how are you? How can I inject dependency into a class I don’t have access to, that is, I can’t say on top of the class that it’s a java bean (@Component). Thank you very much!…
-
0
votes1
answer47
viewsError compiling Dagger 2 in Eclipse
I am studying the project example of the official website of Dagger, which can be accessed in this link: https://github.com/google/dagger/tree/master/examples/simple/src/main/java/coffee. I am using…
-
0
votes2
answers681
viewsError in injection of angular module dependencies
I have the module of my application: angular.module('app', ['app.controllers','app.routes','app.services']); I have my service module: angular.app('app.services', []) .factory('usuarioService',…
angularjs dependency-injection angularjs-services angularjs-factorysasked 8 years, 9 months ago Walter Gandarella 636 -
0
votes1
answer112
viewsInsert license as dependency on a Maven project
EDIT: the problem still persists, posted below, in my reply, new information about the problem. Thank you. Hello! I did some tests using the Jxbrowser library and I intend to use it in my academic…
-
0
votes0
answers41
viewsAutofac: No Scope with a Tag matching Autofacwebrequest
I would like your help to solve the following problem: Imagine that I have a Servicefactory class responsible for creating services (such as srvFact.Create<MyService>()), a Repositoryfactory…
-
0
votes0
answers77
viewsHow to inject dependency into a dynamically created class?
I’m doing a gateway to a client project consuming Microservices. In this gateway, the way the client will consume the application is through an interface. The implementation of this interface will…
-
0
votes1
answer77
viewsOauth with Dependency Injection
Hello, I’m starting my studies with Oauth, and right away I came across a problem. I created the famous 'Startup' class, and in it I call my predecessor as follows: public partial class Startup {…
-
0
votes1
answer69
viewsProblem with Razor
I have a problem I haven’t been able to identify what you’re causing. When trying to enter the Log View, an "Inter-Ternal Server Error" occurs and the message appears below. I am using ASP.NET Core…
-
0
votes1
answer56
viewsAndroid error "android.app.Application does not implement Dagger.android.Hasactivityinjector"
I am trying to run my app and every time I click a button and go to the Extended activity I get the following error: Process: com.converter.android.dailycope, PID: 28573 java.lang.RuntimeException:…
-
0
votes1
answer1608
viewsInterface dependency injection in Typescript - Angular 6
I am doing the front end of a project using Angular 6, but I am beginner in both Angular and Typescript and I am trying to use the interfaces of Typescript as in Java, injecting them to use the…
-
0
votes0
answers27
viewsDWR - Null classes
Expensive I’m having trouble injecting the classes by calling some methods using DWR with Hibernate. Code: @Controller @Transactional public class ManterArvoreClassificacaoController { @Autowired…
java ajax framework dependency-injection instantiate-objectasked 6 years, 3 months ago Kennedy Anderson 90 -
0
votes1
answer71
viewsInject multiple Idbconnection into Asp.Net core
Good morning, you guys, all right? I need to inject 2 Dbcontext into Asp.net core and I’m having problems with it. Follow the code example. string defaultConnectionA =…
-
0
votes2
answers162
viewsFailure in dependency injection
I’m having a problem in a JSF test, basically I have the entity, the service and the view, I couldn’t find anything that would help me solve. In view, I want to call my service by Managedproperty…
-
0
votes0
answers248
viewsUnity - No public constructor is available for type Mvcteste.Repository.Iempresaservice
I’m using UNITY to inject dependency. net framework 4.5, configured everything else at the time of running is presents the error : No public constructor is available for type…
-
0
votes0
answers61
viewsError injecting framework repository into . net core
I’m having trouble trying to inject dependency into a repository. NET framework and API . NET Core and the problem below: An unhandled exception occurred while processing the request.…
-
0
votes1
answer83
viewsMultiple Repository constructors using Unity Application Block C#dependency injection
I have a project that uses Unity Application Block dependency injection. Has the repository class: public class RepositorioDeLaudoMedico: RepositorioGenericoEntityFramework<LaudoMedico, int>,…
-
0
votes1
answer84
viewsDependency injection problems in Angular unit tests
I’m trying to perform unit tests in Angular, but I have some problems with injection dependencies in the services. In the application there are several services that depend on each other, for…
angular unit-testing dependency-injection jasmine karmaasked 5 years, 2 months ago Mauricio Hartmann 131 -
0
votes1
answer50
viewsInjecting Iconfiguration into Controller in Webapi project
I’m developing an API, and I’m implementing JWT on it, I made a Controller to manage the Token and Login but when I inject the interface IConfiguration and the application tells me that I have to…
-
0
votes1
answer205
viewsInstantiating class with dependency injection
I have a method that calls other methods that are not predefined, I am using this library org.reflections and the method java.lang.reflect.Method#invoke to perform another method generically, that…
-
0
votes0
answers215
viewsNestjs dependency injection Unable to resolve dependencies error
I made a simple API using Nestjs to learn. Now I’m making a more complex modularizing, but I had this dependency error: Error: Nest can't resolve dependencies of the UserRepository (?). Please make…
-
0
votes1
answer190
viewsAccess a Singleton Repository outside the Controller (Dependency Injection)
I have a Repository instance added as Scoped in Startup and to access the instance I do the dependency injection by the Controller constructor, or by Fromservices. However, I need to access…
c# asp.net-mvc asp.net-core asp.net-web-api dependency-injectionasked 4 years, 6 months ago Jd3 Tecnologia 50 -
0
votes1
answer75
viewsProblem using Identity in API ASP . NET Core
Good afternoon, I’m trying to use Identity in my API, but I have some error that I believe is dependency injection. I made all the necessary configuration, connected with the bank, managed the…
-
0
votes1
answer333
viewsSpring Boot @Autowired does not work with Repository
I have the following mistake: Description: Field categoriaRepository in com.algaworks.algamoneyapi.resource.CategoriaResource required a bean named 'entityManagerFactory' that could not be found.…
-
-1
votes1
answer231
viewsProblem with JSF2 + CDI + Tomcat
Personal talk, I’m working with JSF and I’m here. I have a simple project for now, with a page with a form that has an Enum attribute in it, IE, when the page is loaded has a selectItems there that…
-
-1
votes1
answer20
viewsViewmodel with Hilt
I’m making a logic in my app to present the appBar of it just when I need wing to appear or not. For this I did the following Viewmodel: Stateappviewmodel @HiltViewModel class StateAppViewModel…