Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I stop spring from injecting Properties.class into my plugin?

We have a plugin that worked fine on Jira 7 but began failing to start on Jira 8.  I narrowed down the failure to a class that has a Properties.class being injected into it by Jira; presumably, by the Spring framework.  This application is designed to be agnostic of Jira and operate in a number of our tools.  For that reason, it does not import anything specific to Jira or any other tool.  It does not import the Spring framework, but still receives the false class being injected into it.

The usual way this class gets initialized is through it's own no-arg constructor, which calls private methods to send a Properties file that has been read off the file system, into a constructor which accepts the Properties file.

Roughly, the class is (It's the properties file in the second constructor that is being injected):

public ConfigClass() {

public ConfigClass(Properties config) {
    fieldVar1 = config.getProperty("blah");

Is it possible to stop the Properties file from being injected without having to import the spring framework?

It's written this way for improved test-ability, which I'm trying to preserve.  I've confirmed it works if I get rid of the constructor accepting the Properties.class and just initialize fully through the no-arg constructor, but this breaks most of it's tests because we then can't mock out the incoming properties.  At least not cleanly.



Log in or Sign up to comment
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

277 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you