Serving Binary Files

In order to serve binary files from the config server you will need to send an Accept header of application/octet-stream.spring-doc.cn

Git, SVN, and Native Backends

Consider the following example for a GIT or SVN repository or a native backend:spring-doc.cn

application.yml
nginx.conf

The nginx.conf might resemble the following listing:spring-doc.cn

server {
    listen              80;
    server_name         ${nginx.server.name};
}

application.yml might resemble the following listing:spring-doc.cn

nginx:
  server:
    name: example.com
---
spring:
  profiles: development
nginx:
  server:
    name: develop.com

The /sample/default/master/nginx.conf resource might be as follows:spring-doc.cn

server {
    listen              80;
    server_name         example.com;
}

/sample/development/master/nginx.conf might be as follows:spring-doc.cn

server {
    listen              80;
    server_name         develop.com;
}

AWS S3

To enable serving plain text for AWS s3, the Config Server application needs to include a dependency on io.awspring.cloud:spring-cloud-aws-context. For details on how to set up that dependency, see the Spring Cloud AWS Reference Guide. In addition, when using Spring Cloud AWS with Spring Boot it is useful to include the auto-configuration dependency. Then you need to configure Spring Cloud AWS, as described in the Spring Cloud AWS Reference Guide.spring-doc.cn

Decrypting Plain Text

By default, encrypted values in plain text files are not decrypted. In order to enable decryption for plain text files, set spring.cloud.config.server.encrypt.enabled=true and spring.cloud.config.server.encrypt.plainTextEncrypt=true in bootstrap.[yml|properties]spring-doc.cn

Decrypting plain text files is only supported for YAML, JSON, and properties file extensions.

If this feature is enabled, and an unsupported file extention is requested, any encrypted values in the file will not be decrypted.spring-doc.cn