Add an external xml file containing passwords to class path in Spring boot

I have a spring boot application which reads some passwords from an xml while, which is not part of the jar.

It has to be in a separate folder. How can I add this xml file to the classpath so that getResourceAsStream("myxml.xml") should work?

                MyConfig myConfig = null;
    //before
                JAXBContext jaxbContext = JAXBContext.newInstance(MyConfig.class);
                Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
    //This should work
                InputStream is = this.getClass().getClassLoader().getResourceAsStream("myxml.xml");
                myConfig = (MyConfig) jaxbUnmarshaller.unmarshal(is);
    //After
Answer:1

I need to get a Google map key for my application and, for this, I need the MD5 signature of my certificate. As seen on the Internet, I use "keytool" to get it : keytool -list -alias mykey -keystore ...

someArray.splice(a,b,...) method in JavaScript adds or removes items to/from array. What could be good and simple solution to implement such method in Java language? Assume we have String[] array.

I have code like this: TextBox txt = new TextBox(){ public void onLoad(){ this.addFocusHandler(new FocusHandler(){ //some codes here //if I use "this" keyword, it refers to the ...

I want the functionality of the Stanford Core NLP, written in java, to be available in C++. To do this I am making use of the Java Native Interface. I have a Java object that wraps multiple functions ...