问题
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:
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
.
来源:https://stackoverflow.com/questions/41358956/spring-cloud-config-server-loading-configuration-other-than-pattern-applicati