提供二進制檔案
為了從組態伺服器提供二進制檔案,您需要發送 Accept
標頭 application/octet-stream
。
Git、SVN 和原生後端
考慮以下 GIT 或 SVN 儲存庫或原生後端的範例
application.yml
nginx.conf
nginx.conf
可能如下所示
server {
listen 80;
server_name ${nginx.server.name};
}
application.yml
可能如下所示
nginx:
server:
name: example.com
---
spring:
profiles: development
nginx:
server:
name: develop.com
/sample/default/master/nginx.conf
資源可能如下所示
server {
listen 80;
server_name example.com;
}
/sample/development/master/nginx.conf
可能如下所示
server {
listen 80;
server_name develop.com;
}
AWS S3
若要啟用為 AWS S3 提供純文字,Config 伺服器應用程式需要包含 io.awspring.cloud:spring-cloud-aws-context
的依賴項。有關如何設定該依賴項的詳細資訊,請參閱 Spring Cloud AWS Reference Guide。此外,當將 Spring Cloud AWS 與 Spring Boot 一起使用時,包含 自動組態依賴項 非常有用。然後您需要設定 Spring Cloud AWS,如 Spring Cloud AWS Reference Guide 中所述。