Hi everyone,
I'm trying to use Spring JAVA library inside a Gerrit Plugin.
When I try to start the library by reading a XML file from resources with the below code:
ClassPathXmlApplicationContext context =
new ClassPathXmlApplicationContext("applicationContext.xml");
I got this error message:
class path resource [applicationContext.xml] cannot be opened because it does not exist
The same code works on a stand-alone Spring application.
Already look through the Gerrit documentation / Google looking for any specific points regarding accessing files stored /resources folder in JAR, but found nothing.
Also tried variations of the file name (with classpath prefix and etc) and the only way it worked was by reading a file from system (/data/applicationContext.xml).
Does anyone knows if it is possible to access files on /resources folder from inside a Gerrit Plugin?
PS: Have similar problem when trying to read logback XML configuration files.
Thanks in advance,
Rafael