All the examples I've found use XML configuration file. I tried the following:
IdSClientConfigurationImpl config = new IdSClientConfigurationImpl("idsclient.properties");
config.load();
And it gave an exception
java.io.FileNotFoundException: idsclient.properties (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_152]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[na:1.8.0_152]
at java.io.FileInputStream.<init>(FileInputStream.java:138) ~[na:1.8.0_152]
at com.cisco.ccbu.common.ids.client.impl.IdSClientConfigurationImpl.load(IdSClientConfigurationImpl.java:82) ~[idsclientlib-11.6.1.jar:na]
I placed the file in the same location as application.properties
.
$ find src -name idsclient\*
src/main/resources/idsclient.properties
It's being copied to the classes folder during mvn spring-boot:run
$ find target -name idsclient\*
target/classes/idsclient.properties
So what is the real path to the file in the context of a Spring Boot app?
I also tried
IdSClientConfigurationImpl config = new IdSClientConfigurationImpl("classpath:/idsclient.properties");
But it gave
java.io.FileNotFoundException: classpath:\idsclient.properties (The filename, directory name, or volume label syntax is incorrect)