I have an spring-boot application deployed on Openshift.
This application is dependent on a plain old java application, which has been added as maven dependence.
The maven dependence requires a foo.properties
file on the classpath, it loads the foo.properties
file using:
inputStream = this.getClass().getResourceAsStream("/foo.properties");
The foo.properties
file will contain different values depending on the environment it's deployed to.
I have tried to externalise the properties by adding a configmap to openshift, and mounting it at: /deployments/config
I have added spring properties to the openshift environment variables:
spring.config.name foo
spring.config.location /deployments/config/
However the maven dependence is unable to pick up the foo.properties
, returning null.
Is what I'm attempting achievable, or are there alternative solutions to this problem?