Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: Spring Active Profile order of evaluation is unclear [SPR-13845] #18418

Closed
spring-projects-issues opened this issue Jan 7, 2016 · 1 comment
Assignees
Labels
type: task A general task
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Prashant Deva opened SPR-13845 and commented

In the docs here , it is unclear what the order of evaluation of active spring profiles is:
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/beans.html#beans-definition-profiles-enable

If i specify the active profiles on:

  1. the 'command line' eg -Dspring.profiles.active="mango, orange" and
  2. my web.xml has active profiles listed as apples

Do the final active profiles contain:

  1. apples or
  2. mango, orange
  3. apples, mango, orange

Affects: 4.2.4

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

In your scenario, the active profiles will be apples, due to the servlet context property source (web.xml context-param entries) overriding system properties (as provided by the command line). Such property values do not get merged but rather completely override each other according to the property source precedence hierarchy.

I've added a corresponding paragraph to the reference documentation, summarizing the details given in StandardServletEnvironment's javadoc and related places.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants