We’re making changes to our server and Data Center products, including the end of sale for new server licenses on February 2, 2021 and the end of support for server on February 2, 2024. Learn what this means for you.
Version 1 plugins in JIRA use the internal Pico Container system to inject dependencies into plugin components. Version 2 plugins in JIRA or any other Atlassian application use Spring 2.5, which is set to default to constructor injection. While both support constructor injection, there are subtle differences:
Spring looks for constructors in the order of the number of arguments, regardless of access modifier. Pico only looks at public constructors. This means if you use no-arg public constructors but have private constructors with multiple arguments for testing, Spring will try to use the private constructors, and throw exceptions if it is unsuccessful. The workaround is to configure the bean directly in Spring XML configuration by placing your configuration file in META-INF/spring.