1. Write the below in the atlassian-plugin.xml.
<component key="helloWorldService" public="true" class="com.akira.MyHelloWorldServiceImpl">
<interface>com.akira.MyHelloWorldService</interface>
</component>
2. MyHelloWorldService
package com.akira;
public interface MyHelloWorldService {
String getMessage();
}
3. MyHelloWorldServiceImpl
package com.akira;
public class MyHelloWorldServiceImpl implements MyHelloWorldService {
public String getMessage() {
return "Hello World";
}
}
4. Use the Component Plugin Module in an ActionSupport class.
public class AkiraActionSupport extends JiraWebActionSupport {
private MyHelloWorldService _myHelloWorldService;
public String doExecute() {
System.out.println(_myHelloWorldService.getMessage());
return SUCCESS;
}
}
5. A NullPointerException occurs because the dependency-injection fails.
6. What other steps are required to make Componet Module available.