Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to use spring annotations in Confluence plugin


I am new to plugin development for Atlassian products. Currently i am writing a plugin for Confluence. Though i know the basics of plugin development i have facing issues while trying to use spring annotation @Autowired in my plugin code. 

In order to resolve the compile error i added the spring-context dependency in my plugin's pom.xml. But after adding that my plugin did not deploy and failed when i ran atlas-run command. I have a REST resource class in my plugin lets say it is A. This class depends on a service class B and invokes it's methods. My plugin was working fine till i was creating an object of B manually by using new keyword in class A.

e.g. - B obj = new B() works just fine, but as soon as i tried to use @Autowired B b; my plugin started complaining.

I have below 3 questions.

1 - Cant I use spring annotations such as @Component , @Autowired, @Service etc in Atlassian plugin code?

2 - Does the Atlassian plugin dependencies bring in spring libraries by default? I mean does the atlassian-spring-scanner-annotation & atlassian-spring-scanner-runtime dependencies bring in spring libraries as well?

3 - What configuration need to do for using spring in Atlassian plugins?






Log in or Sign up to comment
AUG Leaders

Atlassian Community Events