Spring General cloud server settings in all applications

Currently, I have several deployable applications that work in a distributed manner to solve a business problem. We currently use several configuration property files to provide configuration changes for each environment based on a system environment variable. All of these deployable applications have a common database and messaging configuration. This is currently achieved by collecting property files from the class path and using both deployed applications at the same time by a common bank for each connection (db, jms) containing property files.

I am looking to start using Spring Config Server to externalize this configuration, if possible. I have a question on how to share this general configuration.

Currently, it looks something like this: -

Web1
 - database
 - jms

Messaging1
 - database
 - jms

In this situation, both deployed applications use the same connections, and these connections change for each environment (lab, prf, prd, etc.). How can I achieve the same with the Spring configuration server where I have the application configuration for each application deployed?

Application.yml
Web1.yml
Web1-dev.yml
Messaging1.yml
Messaging1-dev.yml

, , .

, ? ?

+10
3

https://cloud.spring.io/spring-cloud-config/single/spring-cloud-config.html, "2.1.5 ". :

(.. git, svn native) application * (, application.properties, application.yml, application- *. Properties ..). application- .

application.properties application.yml ( git svn). .

+5

. github...

https://github.com/spring-cloud/spring-cloud-config/issues/32

. , /config, . , configserver .

+1

.

1 root->application.properties files

2 , , root->service-X.properties files

3: , , env->application.properties env->application.properties

server:
  port: 8888
spring:
  cloud:
    config:
      server:
        git:
          uri:[git repo]
          search-paths: /,/{profile}/

enter image description here

0

Source: https://habr.com/ru/post/1583857/


All Articles