簡體   English   中英

一項服務的所有配置文件的通用屬性:spring cloud config

[英]Common properties for all profile of one service: spring cloud config

我想為一項服務在所有配置文件中設置通用屬性。 怎么做? 現在我有以下結構

application.properies
service1
   profile1
       service1.properties
   profile2
       service1.properties
service2
   profile1
       service2.properties
   profile2
       service2.properties

如何共享service1所有配置文件的通用屬性?

您可以在bootstrap.ymlbootstrap.properties文件中定義以下屬性:

application:
    name: "service1"

cloud:
    config:
      uri: "http://<hostname>:<port>"

# ... more common properties

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM