You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/parameter-store.adoc
+7-13Lines changed: 7 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,7 +226,6 @@ This reload level leverages the refresh feature of Spring Cloud Context.
226
226
* `restart_context`: the whole Spring `ApplicationContext` is gracefully restarted. Beans are recreated with the new configuration.
227
227
In order for the restart context functionality to work properly you must enable and expose the restart actuator endpoint
228
228
[source,yaml]
229
-
====
230
229
----
231
230
management:
232
231
endpoint:
@@ -237,12 +236,10 @@ management:
237
236
exposure:
238
237
include: restart
239
238
----
240
-
====
241
239
242
240
Assuming that the reload feature is enabled with default settings (`refresh` mode), the following bean is refreshed when the secret changes:
243
241
244
-
====
245
-
[java, source]
242
+
[source,java]
246
243
----
247
244
@Configuration
248
245
@ConfigurationProperties(prefix = "bean")
@@ -254,11 +251,9 @@ public class MyConfig {
254
251
255
252
}
256
253
----
257
-
====
258
254
259
255
To see that changes effectively happen, you can create another bean that prints the message periodically, as follows
260
256
261
-
====
262
257
[source,java]
263
258
----
264
259
@Component
@@ -273,7 +268,6 @@ public class MyBean {
273
268
}
274
269
}
275
270
----
276
-
====
277
271
278
272
The reload feature periodically re-creates the configuration from config maps and secrets to see if it has changed.
279
273
You can configure the polling period by using the `spring.cloud.aws.parameter.reload.period` (default value is 1 minute).
@@ -286,7 +280,7 @@ This is very important design specification to have in mind when working with Pa
286
280
Let's say you have 3 profiles `dev`, `uat` and `prod`.
287
281
In `dev` profile you don't want to have loading from Parameterstore, but in other profiles you want load to happen.
288
282
289
-
Our recommended way is to use `spring.config.import=aws-parameterstore:/` in profile `application-${profile}.properties` specific configuration files.
283
+
Our recommended way is to use `spring.config.import=aws-parameterstore:/` in profile `application-$\{profile\}.properties` specific configuration files.
@@ -332,9 +326,9 @@ The Spring Boot Starter for Parameter Store provides the following configuration
332
326
| `spring.cloud.aws.parameterstore.enabled` | Enables the Parameter Store integration. | No | `true`
333
327
| `spring.cloud.aws.parameterstore.endpoint` | Configures endpoint used by `SsmClient`. | No | `null`
334
328
| `spring.cloud.aws.parameterstore.region` | Configures region used by `SsmClient`. | No | `null`
335
-
| `spring.cloud.aws.parameterstore.reload.strategy` | `Enum` | `refresh` | The strategy to use when firing a reload (`refresh`, `restart_context`)
336
-
| `spring.cloud.aws.parameterstore.reload.period` | `Duration`| `15s` | The period for verifying changes
337
-
| `spring.cloud.aws.parameterstore.reload.max-wait-time-for-restart` | `Duration`| `2s` | The maximum time between the detection of changes in property source and the application context restart when `restart_context` strategy is used.
329
+
| `spring.cloud.aws.parameterstore.reload.strategy` | The strategy to use when firing a reload (`refresh`, `restart_context`) | No | `refresh`
330
+
| `spring.cloud.aws.parameterstore.reload.period` | The period for verifying changes | No | `15s`
331
+
| `spring.cloud.aws.parameterstore.reload.max-wait-for-restart` | The maximum time between the detection of changes in property source and the application context restart when `restart_context` strategy is used. | No | `2s`
0 commit comments