I'm trying to follow this outdated tutorial. It's making use of the sal and jira versions of the UserManager. The differentiation they use doesn't seem to work with Spring's annotations.
import com.atlassian.sal.api.user.UserManager;
@Component
public class TestClass extends HttpServlet{
@ComponentImport
private UserManager userManager;
private com.atlassian.jira.user.util.UserManager jiraUserManager;
@Autowired
public TestClass(UserManager userManager, com.atlassian.jira.user.util.UserManager jiraUserManager) {
this.userManager = userManager;
this.jiraUserManager = jiraUserManager;
}
}
This is stripped down version of what I have. (see the repo for full code)
The error I'm getting is:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.jira.user.util.UserManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
Any help would be appreciated in resolving this issue.
You also have to use @ComponentImport for the second bean.
The problem is that I get the exact same error regardless of whether @ComponentImport is present above
private com.atlassian.jira.user.util.UserManager jiraUserManager;
or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I would need an example from you to see, what is going on in your plugin. It would be nice to have it on bitbucket or github
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've uploaded it to github:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev Any thoughts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This a plugin for Spring scanner 1x. It seems, that you wrote everything correctly. I need more time to dig dipper, but unfortunately, I do not have time right now for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.