Spring Cloud Config Server Shared Properties Across Applications

前端 未结 3 1021
长发绾君心
长发绾君心 2021-01-02 03:08

I currently have a number of deployable applications that work in a distributed fashion to solve a business problem. We are currently using a number of property configuratio

3条回答
  •  悲&欢浪女
    2021-01-02 03:16

    I found working solution here https://cloud.spring.io/spring-cloud-config/single/spring-cloud-config.html, paragraph "2.1.5 Sharing Configuration With All Applications". It says:

    With file-based (i.e. git, svn and native) repositories, resources with file names in application* are shared between all client applications (so application.properties, application.yml, application-*.properties etc.). You can use resources with these file names to configure global defaults and have them overridden by application-specific files as necessary.

    You should create application.properties or application.yml at the top level of configuration repository (if it is git or svn based). Don't forget to commit the changes.

提交回复
热议问题