I am using ff4j like this:
FF4J ff4j = new FF4J("config.xml");
Internally, FF4J calls getClass().getClassLoader().getResourceAsStream("config.xml").
I want to be able to choose the config.xml location at deployment time (for example, /etc for linux).
How can I achieve that, without having to hardcode an absolute path? Is it possible to set the JVM / tomcat to look for the file in /etc for example? Or maybe there's another way to achieve what I want with FF4J?
As creator of FF4j I would add a couple of solutions.
Before
1.8.9Since
1.8.9As such you can now also import
Yamlorpropertiesfiles. (thinking about configMap in K8s world here). More samples here