I\'ve made a maven project in Spring 3.0, I\'ve made some DAO, services and controllers, in one of mine controller I call a service in which I start a thread, the problem is tha
Another solution would be to inject the user IUserService in a spring managed component (service, component, etc.) and pass the injected value to the constructor of the class AddFriendInMyFriendListTask.
Thus, the constructor becomes something like this
public AddFriendInMyFriendListTask(User aA, User bB, IUserService userService) {
a = aA;
b = bB;
this.userService = userService;
}
and remove the @Autowired
from the AddFriendInMyFriendListTask class.