Deploying a properties file next to your jar on OpenShift
I’ve recently had the situation where I deployed a Spring Boot application on OpenShift where a certain dependency needed a properties file that couldn’t be found. The problem was that this dependency didn’t scan the classpath for the file, but just opened a FileInputStream relative to the current path.
In this blogpost I will guide you through the process of deploying a text file next to a jar in an OpenShift container. I’ve reproduced an
example scenario, but you can skip these steps and go right to the solution if you want to.