Skip to content

Commit 78a8680

Browse files
committed
docs(cf-env): migration guide — disable/scope options + 4.x backwards-compat note
Mirror the framework doc's control options (JBP_CONFIG_JAVA_CF_ENV disable; bundle java-cfenv-boot/core to scope behaviour) and note that from java-buildpack 5.0.6 the default java-cfenv-all injection restores 4.x parity for the cloud profile and VCAP_SERVICES property mapping (5.0.0-5.0.5 shipped bare core; see #1349). Refs #1349.
1 parent 1411792 commit 78a8680

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

docs/spring-auto-reconfiguration-migration.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,27 @@ This guide provides step-by-step instructions for migrating from the deprecated
2020
> Use `SPRING_PROFILES_ACTIVE=cloud` only if `cloud` should be the sole active profile (it
2121
> replaces any others).
2222
23+
> **Note — controlling the automatic behaviour**
24+
>
25+
> When the application does not bundle java-cfenv itself, the buildpack injects `java-cfenv-all`
26+
> (property mapping **and** `cloud` profile). To scope this:
27+
> - `cf set-env <APP> JBP_CONFIG_JAVA_CF_ENV '{enabled: false}'` (+ `cf restage`) disables the
28+
> **whole** framework — both property mapping and the `cloud` profile. There is no
29+
> `cloud`-profile-only toggle.
30+
> - Because the buildpack backs off when the app already bundles a `java-cfenv*.jar`, bundling your
31+
> own artifact wins: `java-cfenv-boot` = property mapping without the `cloud` profile;
32+
> `java-cfenv` (core) = neither, use the `CfEnv` API directly.
33+
>
34+
> See [Java CfEnv Framework](framework-java-cfenv.md) for details.
35+
36+
> **Note — backwards compatible with buildpack 4.x (java-buildpack 5.0.6+)**
37+
>
38+
> As of java-buildpack **5.0.6**, the buildpack injects `java-cfenv-all` by default, so the `cloud`
39+
> profile activation and the `VCAP_SERVICES` → Spring property mapping behave the same as under
40+
> java-buildpack 4.x. Apps that relied on either under 4.x keep working after upgrading — no
41+
> application change is required for the `cloud`/VCAP behaviour. (Buildpack 5.0.0–5.0.5 shipped the
42+
> bare `java-cfenv` core module, which activated neither; see #1349.)
43+
2344
---
2445
2546
## Table of Contents

0 commit comments

Comments
 (0)