Parameter 0 of method setUserService in <method> required a bean of type <service> that could not be found
You are looking for UserService
with @Qualifier(value = "userService")
here:
@Autowired
@Qualifier(value = "userService")
public void setUserService(UserService userService) {
this.userService = userService;
}
but you don't have it, since your UserServiceImpl
annotated as @Service
without providing it's id.
To set id to your your UserServiceImpl
, you need to annotate it with @Service("userService")
. But if you have a single UserService
implementation, just delete @Qualifier(value = "userService")
from setter, because it's redundant.
And it seems to me, it's not the only place, where you have to remove a @Qualifier
.
@Qualifier
annotation is needed to select exact bean if you have a number of beans of the same type. If you have a single one, you don't need to use it.