Skip to content

Commit 839142f

Browse files
authored
Fix parameter-store.adoc (#1617)
1 parent a56e095 commit 839142f

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

docs/src/main/asciidoc/parameter-store.adoc

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ This reload level leverages the refresh feature of Spring Cloud Context.
226226
* `restart_context`: the whole Spring `ApplicationContext` is gracefully restarted. Beans are recreated with the new configuration.
227227
In order for the restart context functionality to work properly you must enable and expose the restart actuator endpoint
228228
[source,yaml]
229-
====
230229
----
231230
management:
232231
endpoint:
@@ -237,12 +236,10 @@ management:
237236
exposure:
238237
include: restart
239238
----
240-
====
241239

242240
Assuming that the reload feature is enabled with default settings (`refresh` mode), the following bean is refreshed when the secret changes:
243241

244-
====
245-
[java, source]
242+
[source,java]
246243
----
247244
@Configuration
248245
@ConfigurationProperties(prefix = "bean")
@@ -254,11 +251,9 @@ public class MyConfig {
254251
255252
}
256253
----
257-
====
258254

259255
To see that changes effectively happen, you can create another bean that prints the message periodically, as follows
260256

261-
====
262257
[source,java]
263258
----
264259
@Component
@@ -273,7 +268,6 @@ public class MyBean {
273268
}
274269
}
275270
----
276-
====
277271

278272
The reload feature periodically re-creates the configuration from config maps and secrets to see if it has changed.
279273
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
286280
Let's say you have 3 profiles `dev`, `uat` and `prod`.
287281
In `dev` profile you don't want to have loading from Parameterstore, but in other profiles you want load to happen.
288282

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.
290284

291285
`application.properties`
292286
[source,properties]
@@ -305,14 +299,14 @@ spring.cloud.aws.parameterstore.region=us-east-1
305299
[source,properties]
306300
----
307301
spring.config.import=aws-parameterstore:/config/spring/
308-
spring.cloud.aws.parameterstore.reload.max-wait-time-for-restart=10s
302+
spring.cloud.aws.parameterstore.reload.max-wait-for-restart=10s
309303
----
310304

311305
`application-prod.properties`
312306
[source,properties]
313307
----
314308
spring.config.import=aws-parameterstore:/config/spring/
315-
spring.cloud.aws.parameterstore.reload.max-wait-time-for-restart=60s
309+
spring.cloud.aws.parameterstore.reload.max-wait-for-restart=60s
316310
----
317311

318312

@@ -332,9 +326,9 @@ The Spring Boot Starter for Parameter Store provides the following configuration
332326
| `spring.cloud.aws.parameterstore.enabled` | Enables the Parameter Store integration. | No | `true`
333327
| `spring.cloud.aws.parameterstore.endpoint` | Configures endpoint used by `SsmClient`. | No | `null`
334328
| `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`
338332
|===
339333

340334
=== IAM Permissions

0 commit comments

Comments
 (0)