Skip to content

Fix ordering of SPRING_APPLICATION_JSON property source relative to servlet property sources #17652

@windmueller

Description

@windmueller

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:

image

Is this a bug or is there any other way to override parameters from web.xml?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions