addPropertySource method

void addPropertySource(
  1. PropertySource propertySource
)

Adds the given propertySource to the end of the composite chain.

When resolving properties, the property sources are queried in order. Therefore, a source added via this method has lower precedence than any source previously added.

This is appropriate when the new source represents fallback configuration, optional overrides, or system/environment defaults.

If the source already exists in the set, it will not be duplicated.

Implementation

void addPropertySource(PropertySource propertySource) {
  _propertySources.add(propertySource);
}