Spring Cloud Config Client Without Spring Boot

前端 未结 5 1716
猫巷女王i
猫巷女王i 2020-12-02 10:23

We have an existing spring web app deployed as a WAR file into Amazon Elastic Beanstalk. Currently we load properties files as http resources to give us a single source of p

5条回答
  •  孤城傲影
    2020-12-02 11:00

    Posting as an answer because I don't have enough points to comment on Dave Syer's excellent answer. We have implemented his proposed solution in production and it is working as expected. Our newer apps are being written using Boot, while our legacy apps use Spring, but not boot. We were able to use Spring Cloud Config to create a property service that serves properties for both. The changes were minimal. I moved the legacy property files out of the war file to the property service git repository, and changed the property definition from a classpath reference to a URL as Dave describes and inserted our system environment variable just as we did for classpath. It was easy and effective.

    
    
    
    
    

提交回复
热议问题