View Javadoc
1   package com.atlassian.plugin.spring.scanner.test.product.jira;
2   
3   import com.atlassian.jira.bc.issue.comment.CommentService;
4   import com.atlassian.plugin.spring.scanner.annotation.component.JiraComponent;
5   import com.atlassian.plugin.spring.scanner.annotation.imports.JiraImport;
6   import org.springframework.beans.factory.annotation.Autowired;
7   
8   /**
9    * A component that's only instantiated when running in JIRA
10   */
11  @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
12  @JiraComponent
13  public class JiraOnlyComponent {
14  
15      private final CommentService commentService;
16  
17      @Autowired
18      public JiraOnlyComponent(@JiraImport CommentService commentService) {
19          this.commentService = commentService;
20      }
21  }