简体   繁体   中英

Spring Boot external configuration on another server

We are migrating applications to spring boot and we came to conclusion that it would be good to shift all configuration file to external server. I wonder if spring boot is capable of reading configuration file from another server during startup? If this is possible how can I achieve it? Now I read all config data from app-config.yml but in future I would like to get ride of this file from war. Thanks for any answers.

Of course spring has such stuff in the toolbox:

http://cloud.spring.io/spring-cloud-config/

This would give you a central configuration server backed eg by a git repository holding the configuration.

Hope this is what you are looking for.

You can user Spring Cloud Config Server, it allows to share a properties folder via rest services.

In your application client include Spring Cloud Config Client dependency to property sources read those values from server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM