Merge pull request #1468 from Haybu/doc/fix-1466

doc change to use application instead of name in resource paths - fixes gh-1466
This commit is contained in:
Haytham Mohamed
2019-09-19 13:28:09 -05:00
committed by GitHub

View File

@@ -1046,7 +1046,7 @@ TIP: If you testing with curl, then use `--data-urlencode` (instead of `-d`) or
Take the encrypted value and add the `{cipher}` prefix before you put it in the YAML or properties file and before you commit and push it to a remote (potentially insecure) store.
The `/encrypt` and `/decrypt` endpoints also both accept paths in the form of `/*/{name}/{profiles}`, which can be used to control cryptography on a per-application (name) and per-profile basis when clients call into the main environment resource.
The `/encrypt` and `/decrypt` endpoints also both accept paths in the form of `/*/{application}/{profiles}`, which can be used to control cryptography on a per-application (name) and per-profile basis when clients call into the main environment resource.
NOTE: To control the cryptography in this granular way, you must also provide a `@Bean` of type `TextEncryptorLocator` that creates a different encryptor per name and profiles.
The one that is provided by default does not do so (all encryptions use the same key).
@@ -1176,7 +1176,7 @@ Also, the YAML representation is not necessarily a faithful representation of th
== Serving Plain Text
Instead of using the `Environment` abstraction (or one of the alternative representations of it in YAML or properties format), your applications might need generic plain-text configuration files that are tailored to their environment.
The Config Server provides these through an additional endpoint at `/{name}/{profile}/{label}/{path}`, where `name`, `profile`, and `label` have the same meaning as the regular environment endpoint, but `path` is a file name (such as `log.xml`).
The Config Server provides these through an additional endpoint at `/{application}/{profile}/{label}/{path}`, where `application`, `profile`, and `label` have the same meaning as the regular environment endpoint, but `path` is a path to a file name (such as `log.xml`).
The source files for this endpoint are located in the same way as for the environment endpoints.
The same search path is used for properties and YAML files.
However, instead of aggregating all matching resources, only the first one to match is returned.
@@ -1289,8 +1289,8 @@ However, by default, it looks for changes in files that match the application na
The strategy to use when you want to override the behavior is `PropertyPathNotificationExtractor`, which accepts the request headers and body as parameters and returns a list of file paths that changed.
The default configuration works out of the box with Github, Gitlab, Gitea, Gitee, Gogs or Bitbucket.
In addition to the JSON notifications from Github, Gitlab, Gitee, or Bitbucket, you can trigger a change notification by POSTing to `/monitor` with form-encoded body parameters in the pattern of `path={name}`.
Doing so broadcasts to applications matching the `{name}` pattern (which can contain wildcards).
In addition to the JSON notifications from Github, Gitlab, Gitee, or Bitbucket, you can trigger a change notification by POSTing to `/monitor` with form-encoded body parameters in the pattern of `path={application}`.
Doing so broadcasts to applications matching the `{application}` pattern (which can contain wildcards).
NOTE: The `RefreshRemoteApplicationEvent` is transmitted only if the `spring-cloud-bus` is activated in both the Config Server and in the client application.
@@ -1361,7 +1361,7 @@ Spring Retry has a `RetryInterceptorBuilder` that supports creating one.
=== Locating Remote Configuration Resources
The Config Service serves property sources from `/{name}/{profile}/{label}`, where the default bindings in the client app are as follows:
The Config Service serves property sources from `/{application}/{profile}/{label}`, where the default bindings in the client app are as follows:
* "name" = `${spring.application.name}`
* "profile" = `${spring.profiles.active}` (actually `Environment.getActiveProfiles()`)