We have seen plugins, which are great in terms of functionality but come with a big list of configuration steps. Much like a treadmill—great asset but very hard to assemble!
Is there a way we can handle these configurations—like creating custom fields, adding options, creating listeners, services and so on—automatically, when the plugin is installed? The answer is Yes.
Atlassian Spring Scanner is a set of libraries that make plugins faster to load and easier to develop. In this recipe, we will use Spring Scanner to write a listener class that also makes use of some Spring interfaces for lifecycle management.
Following are the steps to set up the environment:
Create a skeleton plugin, without any modules in it.
Add the following dependency in the
pom.xml
for the Spring interfaces we will use in this recipe:<dependency> <groupId>org.springframework</groupId> <artifactId...