@@ -7519,7 +7519,7 @@ is populated with additional default property sources including servlet config a
75197519context parameters. {api-spring-framework}/web/portlet/context/StandardPortletEnvironment.html[`StandardPortletEnvironment`]
75207520similarly has access to portlet config and portlet context parameters as property sources.
75217521Both can optionally enable a {api-spring-framework}/jndi/JndiPropertySource.html[`JndiPropertySource`].
7522- See Javadoc for details.
7522+ See the javadocs for details.
75237523====
75247524
75257525Concretely, when using the `StandardEnvironment`, the call to `env.containsProperty("foo")`
@@ -7531,7 +7531,16 @@ runtime.
75317531The search performed is hierarchical. By default, system properties have precedence over
75327532environment variables, so if the `foo` property happens to be set in both places during
75337533a call to `env.getProperty("foo")`, the system property value will 'win' and be returned
7534- preferentially over the environment variable.
7534+ preferentially over the environment variable. Note that property values will not get merged
7535+ but rather completely overridden by a preceding entry.
7536+
7537+ For a common `StandardServletEnvironment`, the full hierarchy looks as follows, with the
7538+ highest-precedence entries at the top:
7539+ * ServletConfig parameters (if applicable, e.g. in case of a `DispatcherServlet` context)
7540+ * ServletContext parameters (web.xml context-param entries)
7541+ * JNDI environment variables ("java:comp/env/" entries)
7542+ * JVM system properties ("-D" command-line arguments)
7543+ * JVM system environment (operating system environment variables)
75357544====
75367545
75377546Most importantly, the entire mechanism is configurable. Perhaps you have a custom source
0 commit comments