0

In Spring Javadoc:

"existing configuration makes use of the "systemPropertiesMode" and/or "systemPropertiesModeName" properties. Users are encouraged to move away from using these settings, and rather configure property source search order through the container's Environment"

Why is it encouraged to search through container's Environment?

EDIT:

Need to understand why to use @PropertySource instead of PropertyPlaceholderConfigurer, what benefits does PropertySource gives over PropertyPlaceholderConfigurer if both achieve the goals of fetching resources mentioned through the path.

Aakash Parashar
  • 386
  • 1
  • 2
  • 14

1 Answers1

0

I assume it is because rule #3 of 12 factor app principles:

The twelve-factor app stores config in environment variables (often shortened to env vars or env). Env vars are easy to change between deploys without changing any code; unlike config files, there is little chance of them being checked into the code repo accidentally; and unlike custom config files, or other config mechanisms such as Java System Properties, they are a language- and OS-agnostic standard.

luboskrnac
  • 23,973
  • 10
  • 81
  • 92