You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to override servlet context parameters included in the web.xml of a Spring Boot war file. To achieve this, I added the environment variable SPRING_APPLICATION_JSON to the setenv.sh file of my Tomcat installation.
According to the documentation, the JSON config should be evaluated first. This is not the case, the valued from the web.xml are used instead.
While debugging PropertySourcesPropertyResolver, I discovered that the list of property resolvers has a different ordering than described in the documentation:
Is this a bug or is there any other way to override parameters from web.xml?
The text was updated successfully, but these errors were encountered:
It does look like there's a discrepancy between the docs and the actual behavior. The property source for SPRING_APPLICATION_JSON is ordered before jndiProperties but it doesn't seem to be doing anything about ordering it with respect to servletConfigInitParams and servletContextInitParams.
Let's see what the team thinks about what the correct behavior should be.
mbhave
changed the title
SPRING_APPLICATION_JSON is evaluated too late
Fix ordering of SPRING_APPLICATION_JSON property source relative to servlet property sources
Jul 31, 2019
I am trying to override servlet context parameters included in the
web.xml
of a Spring Boot war file. To achieve this, I added the environment variableSPRING_APPLICATION_JSON
to thesetenv.sh
file of my Tomcat installation.According to the documentation, the JSON config should be evaluated first. This is not the case, the valued from the
web.xml
are used instead.While debugging
PropertySourcesPropertyResolver
, I discovered that the list of property resolvers has a different ordering than described in the documentation:Is this a bug or is there any other way to override parameters from
web.xml
?The text was updated successfully, but these errors were encountered: