org.springframework.core.env.ConfigurableEnvironment |
Known Indirect Subclasses |
Configuration interface to be implemented by most if not all Environments
. Provides facilities for setting active and default profiles as well
as accessing the property sources
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the
PropertySources for this environment in mutable form
| |||||||||||
Return the value of
getenv() if allowed by the current SecurityManager,
otherwise return a map implementation that will attempt to access individual keys using calls to
getenv(String) . | |||||||||||
Return the value of
getProperties() if allowed by the current SecurityManager,
otherwise return a map implementation that will attempt to access individual keys using calls to
getProperty(String) . | |||||||||||
Specify the set of profiles active for this Environment.
| |||||||||||
Specify the set of profiles to be made active by default if no other profiles
are explicitly made active through
setActiveProfiles(String...) . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.springframework.core.env.ConfigurablePropertyResolver
| |||||||||||
From interface
org.springframework.core.env.Environment
| |||||||||||
From interface
org.springframework.core.env.PropertyResolver
|
Return the PropertySources
for this environment in mutable form
Return the value of getenv()
if allowed by the current SecurityManager,
otherwise return a map implementation that will attempt to access individual keys using calls to
getenv(String)
.
Note that most Environment
implementations will include this system environment map as
a default PropertySource
to be searched. Therefore, it is recommended that this method not be
used directly unless bypassing other property sources is expressly intended.
Calls to get(Object)
on the Map returned will never throw IllegalAccessException
;
in cases where the SecurityManager forbids access to a property, null
will be returned and an
INFO-level log message will be issued noting the exception.
Return the value of getProperties()
if allowed by the current SecurityManager,
otherwise return a map implementation that will attempt to access individual keys using calls to
getProperty(String)
.
Note that most Environment
implementations will include this system properties map as a
default PropertySource
to be searched. Therefore, it is recommended that this method not be
used directly unless bypassing other property sources is expressly intended.
Calls to get(Object)
on the Map returned will never throw IllegalAccessException
;
in cases where the SecurityManager forbids access to a property, null
will be returned and an
INFO-level log message will be issued noting the exception.
Specify the set of profiles active for this Environment. Profiles are evaluated during container bootstrap to determine whether bean definitions should be registered with the container.
Specify the set of profiles to be made active by default if no other profiles
are explicitly made active through setActiveProfiles(String...)
.