Summary
Since the Go rewrite, the buildpack injects the bare java-cfenv (core) module. In 4.x it effectively provided java-cfenv-all. The core module has no spring.factories, so apps that rely on the buildpack's java-cfenv no longer get automatic VCAP→Spring property mapping, nor the cloud Spring profile they had before. The change is silent — the app starts fine, just without that configuration.
Impact
Apps upgrading 4.x → 5.x that don't bundle java-cfenv themselves may quietly lose:
- the
cloud profile (so application-cloud.* / @Profile("cloud") config stops loading), and
- automatic service properties (
spring.datasource.*, spring.data.mongodb.uri, RabbitMQ/Redis, etc.).
What we observed
Same app, only the buildpack differs:
4.x: The following 1 profile is active: "cloud"
i.p.c.p.CloudProfileApplicationListener : 'cloud' profile activated
5.x: No active profile set, falling back to 1 default profile: "local"
The injected jars confirm it:
- 4.x container → jar contains
io.pivotal.cfenv.profile.CloudProfileApplicationListener → java-cfenv-all.
- 5.x container → core classes only, no
spring.factories → bare java-cfenv.
The cloud profile listener lives only in java-cfenv-all, which explains the difference.
The migration guide still recommends java-cfenv-boot and describes the cloud profile as active on CF, which suggests this artifact change was unintended rather than a deliberate behavior change.
Suggested fix
Point the java-cfenv dependency at java-cfenv-all (version-matched to the app's Spring Boot major — 3.5.1 for SB3, 4.0.0 for SB4), restoring 4.x behavior with no action needed from apps. This touches manifest.yml (source/uri, plus the version-match regex, which won't match a java-cfenv-all-* filename as-is).
Note — a small related manifest item
The mirrored java-cfenv 3.5.1 and 4.0.0 entries currently share the same uri/sha256 (and source_sha256 is empty), so both resolve to the same file. Re-mirroring java-cfenv-all for both versions would be a good moment to refresh these too.
Workaround for app teams
Add java-cfenv-all explicitly (matched to your Spring Boot version):
<dependency>
<groupId>io.pivotal.cfenv</groupId>
<artifactId>java-cfenv-all</artifactId>
<version>4.0.0</version>
</dependency>
or set the profile directly: cf set-env <APP> SPRING_PROFILES_ACTIVE cloud && cf restage <APP>.
Summary
Since the Go rewrite, the buildpack injects the bare
java-cfenv(core) module. In 4.x it effectively providedjava-cfenv-all. The core module has nospring.factories, so apps that rely on the buildpack's java-cfenv no longer get automatic VCAP→Spring property mapping, nor thecloudSpring profile they had before. The change is silent — the app starts fine, just without that configuration.Impact
Apps upgrading 4.x → 5.x that don't bundle java-cfenv themselves may quietly lose:
cloudprofile (soapplication-cloud.*/@Profile("cloud")config stops loading), andspring.datasource.*,spring.data.mongodb.uri, RabbitMQ/Redis, etc.).What we observed
Same app, only the buildpack differs:
The injected jars confirm it:
io.pivotal.cfenv.profile.CloudProfileApplicationListener→java-cfenv-all.spring.factories→ barejava-cfenv.The
cloudprofile listener lives only injava-cfenv-all, which explains the difference.The migration guide still recommends
java-cfenv-bootand describes thecloudprofile as active on CF, which suggests this artifact change was unintended rather than a deliberate behavior change.Suggested fix
Point the java-cfenv dependency at
java-cfenv-all(version-matched to the app's Spring Boot major —3.5.1for SB3,4.0.0for SB4), restoring 4.x behavior with no action needed from apps. This touchesmanifest.yml(source/uri, plus the version-match regex, which won't match ajava-cfenv-all-*filename as-is).Note — a small related manifest item
The mirrored
java-cfenv3.5.1and4.0.0entries currently share the sameuri/sha256(andsource_sha256is empty), so both resolve to the same file. Re-mirroringjava-cfenv-allfor both versions would be a good moment to refresh these too.Workaround for app teams
Add java-cfenv-all explicitly (matched to your Spring Boot version):
or set the profile directly:
cf set-env <APP> SPRING_PROFILES_ACTIVE cloud && cf restage <APP>.