Skip to content

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

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

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

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

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

Closes gh-36269

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants