【发布时间】:2017-04-03 18:32:40
【问题描述】:
我将我的 oauth 凭据存储在 Cloud Foundry 的 env 变量中。我使用的服务器是 TomCat。如何在我的清单文件中屏蔽我的环境变量,以便我的 clientId 和 secrets 不会被暴露?我见过用户使用属性占位符的例子。
spring:
profiles:
active: dev
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML5
encoding: UTF-8
content-type: text/html
cache: true
env:
accessTokenUri: https://mytokenURI
apiUrl: https://apiUrls/
clientId: someID
clientSecret: NotTellingYou
scope: scope
尝试
在我的系统环境变量中,我添加了键“accessTokenUri”和值。
env:
accessTokenUri: ${accessTokenUri}
apiUrl: https://apiUrls/
clientId: someID
clientSecret: NotTellingYou
scope: scope
//output
Property '${accessTokenUri}' found in manifest. This feature is no longer supported. Please remove it and try again.
【问题讨论】:
-
你使用的是哪个服务器?
-
我正在使用 tomcat 将其部署到云代工厂
标签: spring properties manifest cloud-foundry