(Spring cloud config server) Loading configuration other than pattern {application}/{profile}

578 views Asked by At

In https://github.com/shauank/spring-cloud/tree/master/spring-cloud-prop, how to read property value from email-conf.properties.

Assuming: spring.application.name=reservation and profile=default. As per convention spring cloud will load reservation.properties and application.properties. But I wanted to load email-conf.properties also. How to achieve?

1

There are 1 answers

0
Kane On

See the doc of cloud config, access the endpoint /{name}/{profile}/{label}/{path} for plain text file.

In your case, you can get the content of email-conf.properties via url /reservation/default/master/email-conf.properties.