Skip to content

Document that spring.profiles.active is ignored by the TCF#36594

Closed
Mohak-Nagaraju wants to merge 1 commit intospring-projects:6.1.xfrom
Mohak-Nagaraju:gh-36269-document-activeprofiles-override
Closed

Document that spring.profiles.active is ignored by the TCF#36594
Mohak-Nagaraju wants to merge 1 commit intospring-projects:6.1.xfrom
Mohak-Nagaraju:gh-36269-document-activeprofiles-override

Conversation

@Mohak-Nagaraju
Copy link
Copy Markdown

@Mohak-Nagaraju Mohak-Nagaraju commented Apr 3, 2026

Overview

The Test Context Framework does not honor the spring.profiles.active system property when determining active profiles for a test class.

This commit documents that behavior in the following places:

  • @ActiveProfiles Javadoc
  • DefaultActiveProfilesResolver Javadoc
  • Reference manual @ActiveProfiles annotation section
  • Reference manual Context Configuration with Environment
    Profiles section, including a new
    SystemPropertyActiveProfilesResolver example showing how
    to allow spring.profiles.active to override @ActiveProfiles

Related Issues

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 3, 2026
The Test Context Framework does not honor the
spring.profiles.active system property when determining
active profiles for a test class.

This commit documents that behavior in the @activeprofiles
and DefaultActiveProfilesResolver Javadoc, as well as in
the reference manual. A SystemPropertyActiveProfilesResolver
example is also added showing how to allow
spring.profiles.active to override @activeprofiles.

Closes spring-projectsgh-36269

Signed-off-by: Mohak Nagaraju <98132980+Mohak-Nagaraju@users.noreply.github.com>
@Mohak-Nagaraju Mohak-Nagaraju force-pushed the gh-36269-document-activeprofiles-override branch from 4cd0cfd to f99f696 Compare April 3, 2026 20:59
@sbrannen
Copy link
Copy Markdown
Member

sbrannen commented Apr 4, 2026

Note: this was done against 6.1.x. Happy to retarget
to main if preferred.

6.1.x is no longer supported.

So, please base this on 7.0.x.

After I merge it, I'll forward-merge to main (7.1) and backport it to 6.2.x manually.

@sbrannen sbrannen added in: test Issues in the test module type: documentation A documentation task status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 4, 2026
@sbrannen sbrannen self-assigned this Apr 4, 2026
@sbrannen sbrannen added this to the 7.0.7 milestone Apr 4, 2026
@Mohak-Nagaraju Mohak-Nagaraju changed the base branch from 6.1.x to 7.0.x April 5, 2026 03:58
@Mohak-Nagaraju Mohak-Nagaraju changed the base branch from 7.0.x to 6.0.x April 5, 2026 04:01
@Mohak-Nagaraju Mohak-Nagaraju changed the base branch from 6.0.x to 6.1.x April 5, 2026 04:08
@sbrannen
Copy link
Copy Markdown
Member

sbrannen commented Apr 5, 2026

I see you changed the base to 7.0.x but then changed it back to 6.1.x.

Can you please change it to 7.0.x?

@sbrannen sbrannen changed the title Document that spring.profiles.active is ignored by the TCF Document that spring.profiles.active is ignored by the TCF Apr 5, 2026
@Mohak-Nagaraju
Copy link
Copy Markdown
Author

Mohak-Nagaraju commented Apr 5, 2026

Apologies for the confusion! I have rebased my changes onto 7.0.x. I will open a new PR against 7.0.x and close this one.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Apr 5, 2026
@Mohak-Nagaraju
Copy link
Copy Markdown
Author

Closing in favour of #36600 which targets 7.0.x as requested by @sbrannen.

@sbrannen sbrannen added status: superseded An issue that has been superseded by another and removed status: feedback-provided Feedback has been provided labels Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: test Issues in the test module status: superseded An issue that has been superseded by another type: documentation A documentation task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants