Resolve plain text file via Spring Cloud Config

18 Views Asked by At

This is not a Hazelcast question, it is a Spring Cloud Config question.

We currently have our hazelcast.xml file in src/main/resources/ and we obtain it as follows:

InputStream is = getClass().getClassLoader().getResourceAsStream("hazelcast.xml");

We wish to externalize hazelcast.xml into our Spring Cloud Config Server so that it is no longer bundled with the application and can be updated without a code release.

What would be the new means to resolve the file? I would need an InputStream to pass on to the hazelcast XmlConfigBuilder.

Note that Spring Boot already resolves our application.yml via Spring Cloud Config Server.

Many thanks, Robin.

0

There are 0 best solutions below