I have tried in the past to create Spring beans as documented in Advanced Configuration with Spring XML Files but have been unsuccessful.
Are there any plugins with source code and/or detailed tutorials available that use this feature that developers could look at / follow as a starting pont?
Thanks,
Jim
Community moderators have prevented the ability to post new answers.
Hi Jim
I have used in my Badgr plugin to add a component scan for the Achievements in Badgr.
source code is available on https://bitbucket.org/stefankohler/stash-badgr/src/30ef0b6bd6f5/src/main/resources/META-INF/spring/plugin-context.xml
Not sure that's the way you want to add your beans, but it might get you started.
Cheers,
Stefan
Awesome! Thanks so much for sharing! I had only tried using XML based bean definitions before, but didn't think to try annotation based bean wiring since I'm currently on Confluence 3.5.13, which uses Spring 2.0.8
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found my error. While playing around, I set the plugin to version 1. Now, with version="2" the META-INF/spring/plugin-context.xml get's read.
Regards
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this is what I'm experiencing, too. Spring does not autowire my custom action with beans defined in META-INF/spring/plugin-context.xml. Does anybody know, how this is supposed to work?
Regards
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am trying to create a custom field implementation in my JIRA plugin.
This custom field needs webservices provided by a Spring bean. I tried to inject the WebService Proxy instance in many way into the CustomField class with no luck.
I tried by autowiring the CustomField attribute to the spring bean.
I followed every single line of the Atlassian documentation. My beans are declared in /META-INF/spring-beans.xml
When I run a Junit test base on the same XML config, it works !
When I use the plugin inside a JIRA instance, bean is not injected in CustomField attribute then a NullPointerException is thrown.
Please help !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Jim!
I'm trying to develop a Spring-Plugin for Confluence, too and while searching for examples I came over your post. I've got a view questions:
Thanks for your help!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.