What exactly is the library doing? Starting an ApplicationContext?
(Presumably from a certain resource? (Is that hardcoded?))
If it's using spring-boot, then you might be able to get away by setting
`spring.config.additional-location=[PATH_TO_YOUR_XML]` (to add to the
default settings) or
`spring.config.location=PATH` (to replace them)
both of which you can either specify via System properties
(-D[key]=[value]) or the process ENV -- in the latter case you need to
format the keys as `SPRING_CONFIG_ADDITIONALLOCATION` and
`SPRING_CONFIG_LOCATION`, respectively. But I don't think you can do
that if it's plain old spring (although it might be worth a try).
Reference for these settings is here:
<
https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/html/appendix-application-properties.html#common-application-properties>
If it's plain old Spring, then if I'm not mistaken the path it will load
from must be specified in the code. If so, you might be able to input
your settings by removing the corresponding resource in the JAR and
providing your own version (since Spring will look for the resource on
the classpath). Your own version might even have precedence, I don't know.
But this is a lot of guesswork on my behalf, because it depends a lot on
what the library does and how. But if it's a library that you need to be
able to configure and that doesn't give you the means to, I would add it
might be worth reconsidering whether you should use it at all.
--
DF.