Skip to content

Commit 0846298

Browse files
committed
docs(cf-env): address Copilot review — restage steps, grammar fixes
- Add cf restage to set-env/unset-env examples; buildpack only re-reads JBP_CONFIG_JAVA_CF_ENV during staging - Fix CloudFoundry -> Cloud Foundry, detail -> details - Add trailing newline
1 parent 11fce93 commit 0846298

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

docs/framework-java-cfenv.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Java CfEnv Framework
2-
The Java CfEnv Framework provides the `java-cfenv` library for Spring Boot 3.x and 4.x applications. This library sets various Spring Boot properties by parsing CloudFoundry variables such as `VCAP_SERVICES`, allowing Spring Boot's autoconfiguration to kick in.
2+
The Java CfEnv Framework provides the `java-cfenv` library for Spring Boot 3.x and 4.x applications. This library sets various Spring Boot properties by parsing Cloud Foundry variables such as `VCAP_SERVICES`, allowing Spring Boot's autoconfiguration to kick in.
33

4-
This is the recommended replacement for Spring AutoReconfiguration library which is deprecated. See the `java-cfenv` <a href="https://github.com/pivotal-cf/java-cfenv">repository</a> for more detail.
4+
This is the recommended replacement for Spring AutoReconfiguration library which is deprecated. See the `java-cfenv` <a href="https://github.com/pivotal-cf/java-cfenv">repository</a> for more details.
55

66
The included `java-cfenv` library activates the `cloud` Spring profile at runtime when `VCAP_SERVICES` is present, as the Spring AutoReconfiguration framework did. The buildpack itself does not set any Spring profile.
77

@@ -31,12 +31,16 @@ The framework can be disabled via the `JBP_CONFIG_JAVA_CF_ENV` environment varia
3131

3232
```bash
3333
cf set-env <app> JBP_CONFIG_JAVA_CF_ENV '{enabled: false}'
34+
cf restage <app>
3435
```
3536

37+
The buildpack only re-reads this variable during staging, so a `cf restage` is required for the change to take effect.
38+
3639
To re-enable, either set it back to `{enabled: true}` or remove the variable entirely:
3740

3841
```bash
3942
cf unset-env <app> JBP_CONFIG_JAVA_CF_ENV
43+
cf restage <app>
4044
```
4145

4246
| Variable | Default | Description |
@@ -48,4 +52,4 @@ Note: if `java-cfenv*.jar` is already present in the application, the buildpack
4852
Disable when:
4953
- The application handles `VCAP_SERVICES` manually with custom binding logic
5054
- The automatic `cloud` profile activation is unwanted
51-
- Another service binding library conflicts with `java-cfenv`
55+
- Another service binding library conflicts with `java-cfenv`

0 commit comments

Comments
 (0)