2017-03-17 123 views
0

我想寫我的第一個JQL函數。因此我需要訪問用戶的BrowseContext。我怎樣才能訪問它?JIRA JQL模塊和依賴注入

我試圖將其添加爲使用

private final BrowseContext ctx; 

public MyFunction(BrowseContext ctx) { 
    this.ctx = ctx; 

} 

結果構造函數是一個例外,指出:

No qualifying bean of type [com.atlassian.jira.project.browse.BrowseContext] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} 

任何想法什麼不順心或者我有什麼改變?

+0

上面我不知道夠不夠JIRA,以幫助你在上面@Scaned,但我覺得人誰知道足夠多的人仍然需要你更多的背景。你能給出一個完整的最小可重現的代碼示例嗎?你如何運行上面的代碼? –

回答