【发布时间】:2019-02-21 17:17:47
【问题描述】:
我在 github repo 中查看了一些 spring 云配置服务器的代码,下面是作为属性文件的一部分提供的 2 个值。我相信为了连接到 github 的 https 端点,用户 id 和密码也是必要的。这些可能是环境变量的一部分吗?
server.port=7070
spring.cloud.config.server.git.uri=https://
编辑:
下面是我在spring网站上看到的例子。但是,在我企业内的所有 github 存储库中,我没有看到用户 ID 和密码被设置,因为它们是敏感信息。如果属性文件中没有提供uid / pwd,如何设置或配置服务器访问github url?
spring:
cloud:
config:
server:
git:
uri: https://github.com/spring-cloud-samples/config-repo
username: trolley
password: strongpassword
【问题讨论】:
-
通过环境变量?
标签: java spring spring-boot spring-cloud