Skip to content

Tag: dependency-injection

Dagger Component has conflicting scopes

I am using Dagger and I have an app component with @Singleton scope and also a subcomponent with @Singleton scope. Now when I compile it I get this error: [io.droid.nowtellapp.dagger.SignInMvpComponet] io.droid.nowtellapp.dagger.SignInMvpComponet has conflicting scopes: io.droid.nowtellapp.dagger.ApplicationC…

Difference between @Bean and @Autowired

Why can’t I use @Autowired in this case? but can use @Bean Aren’t the two ways to generate BookingService the same thing? Answer @Bean and @Autowired do two very different things. The other answers here explain in a little more detail, but at a simpler level: @Bean tells Spring ‘here is an i…