You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/05/14 10:46:50 UTC

[GitHub] [servicecomb-java-chassis] shijinkui opened a new issue #1750: microservice.yaml支持include properties,并支持占位符替换property

shijinkui opened a new issue #1750:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1750


   external_conf.properties
   ```
   app_name=xxxx
   ```
   再microservice.yaml里include external_conf.properties,替换yaml中的变量占位符。
   
   ```
   !include external_conf.properties
   APPLICATION_ID: ${app_name}
   service_description:
     name: fooService
     version: 0.0.1
   
   servicecomb:
     rest:
       address: 0.0.0.0:8080
   ```
   
   这样能够很容易做dev/prod环境配置。如果多环境直接操作yaml,就要维护本地开环境的配置yaml和yaml.tmpl模板。
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1750: microservice.yaml支持include properties,并支持占位符替换property

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1750:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1750#issuecomment-628986090


   不会加载为环境变量。 你不能使用 properties 文件, 可以使用多个 microservice.yaml文件完成类似的功能。 或者使用环境比变量、 -D参数, 动态配置替换占位符。 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] shijinkui commented on issue #1750: microservice.yaml支持include properties,并支持占位符替换property

Posted by GitBox <gi...@apache.org>.
shijinkui commented on issue #1750:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1750#issuecomment-628667389


   > 支持占位符。microservice.yaml本身也支持多层覆盖。 详细可以了解下: https://docs.servicecomb.io/java-chassis/zh_CN/config/general-config/
   
   hi, @liubao68 properties资源文件在resource下面被servicecomb加载为环境变量? 然后替换`{xxx}`占位符变量?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1750: microservice.yaml支持include properties,并支持占位符替换property

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1750:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1750#issuecomment-628575024


   支持占位符。microservice.yaml本身也支持多层覆盖。 详细可以了解下: https://docs.servicecomb.io/java-chassis/zh_CN/config/general-config/


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] shijinkui closed issue #1750: microservice.yaml支持include properties,并支持占位符替换property

Posted by GitBox <gi...@apache.org>.
shijinkui closed issue #1750:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1750


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org