1
我正在开发一个使用atlassian-sdk的Bitbucket插件。当我尝试使用GitCommandFactory,我碰到下面的错误:如何解决“AOP配置似乎无效”的错误?
"AOP configuration seems to be invalid: tried calling method [public
abstract com.atlassian.bitbucket.scm.git.command.GitCommandFactory
com.atlassian.bitbucket.scm.git.GitScm.getCommandFactory()] on target
[[email protected]]; nested
exception is java.lang.IllegalArgumentException: object is not an
instance of declaring class"
这是代码引发错误行:
GitCommandFactory gitCommandFactory = gitScm.getCommandFactory();
我班的一瞥和构造:
@ComponentImport
private final PullRequestService pullRequestService;
@ComponentImport
private final GitScm gitScm;
@ComponentImport
private final GitScmConfig gitScmConfig;
@ComponentImport
private final EventPublisher eventPublisher;
@Autowired
private ApplicationContext applicationContext;
private Logger loggerLocal;
@Autowired
public SquashServlet(PullRequestService pullRequestService, GitScm gitScm, GitScmConfig gitScmConfig, EventPublisher eventPublisher) throws Exception{
super();
this.pullRequestService = pullRequestService;
this.gitScm = gitScm;
this.gitScmConfig = gitScmConfig;
this.eventPublisher = eventPublisher;
FileHandler handler = new FileHandler("BitBuckSquash.log",true);
this.loggerLocal = java.util.logging.Logger.getLogger("com.atlassian.kaushik.plugin.servlet");
loggerLocal.addHandler(handler);
}
我该如何解决这个问题?我究竟做错了什么?