PropertySource objects are not typically used in isolation, but rather
through a PropertySources object, which aggregates property sources and in
conjunction with a PropertyResolver implementation that can perform
precedence-based searches across the set of PropertySources.

PropertySource identity is determined not based on the content of
encapsulated properties, but rather based on the name of the
PropertySource alone. This is useful for manipulating PropertySource
objects when in collection contexts. See operations in MutablePropertySources
as well as the named(String) and toString() methods for details.

Note that when working with @Configuration classes that
the @PropertySource
annotation provides a convenient and declarative way of adding property sources to the
enclosing Environment.

hashCode

public int hashCode()

Return a hash code derived from the name property
of this PropertySource object.

Overrides:

hashCode in class java.lang.Object

toString

public java.lang.String toString()

Produce concise output (type and name) if the current log level does not include
debug. If debug is enabled, produce verbose output including the hash code of the
PropertySource instance and every name/value property pair.

This variable verbosity is useful as a property source such as system properties
or environment variables may contain an arbitrary number of property pairs,
potentially leading to difficult to read exception and log messages.