Class CompositePropertySource


public class CompositePropertySource extends EnumerablePropertySource<Object>
Composite PropertySource implementation that iterates over a set of PropertySource instances. Necessary in cases where multiple property sources share the same name, e.g. when multiple values are supplied to @PropertySource.

As of Spring 4.1.2, this class extends EnumerablePropertySource instead of plain PropertySource, exposing getPropertyNames() based on the accumulated property names from all contained sources (as far as possible).

Since:
3.1.1
Author:
Chris Beams, Juergen Hoeller, Phillip Webb
  • Constructor Details

    • CompositePropertySource

      public CompositePropertySource(String name)
      Create a new CompositePropertySource.
      Parameters:
      name - the name of the property source
  • Method Details