JIRA has a component system that has many Service classes and Manager classes that are registered in PicoContainer
and available for use by core classes and plugins alike. At times, however, we will have to add custom components to that component system, which can then be used with other modules in the same plugin or shared by other plugins.
In this recipe, we will see how we can add a new component in JIRA and how we can consume that from within the same or a separate plugin.
Create a Skeleton plugin using Atlassian Plugin SDK.
Also, take a look at https://bitbucket.org/atlassian/atlassian-spring-scanner if you are using the Atlassian Spring Scanner to get an understanding of the various annotations used in this recipe.