Class Profiles
java.lang.Object
org.springframework.boot.context.config.Profiles
Provides access to environment profiles that have either been set directly on the
Environment
or will be set based on configuration data property values.- Since:
- 2.4.0
- Author:
- Phillip Webb, Madhura Bhave
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of property to set to specify additionally included active profiles. -
Method Summary
Modifier and TypeMethodDescriptionReturn the accepted profiles.Return the active profiles.Return the default profiles.boolean
isAccepted
(String profile) Return if the given profile is active.iterator()
Return an iterator for allaccepted profiles
.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
INCLUDE_PROFILES_PROPERTY_NAME
Name of property to set to specify additionally included active profiles.- See Also:
-
-
Method Details
-
iterator
Return an iterator for allaccepted profiles
. -
getActive
Return the active profiles.- Returns:
- the active profiles
-
getDefault
Return the default profiles.- Returns:
- the active profiles
-
getAccepted
Return the accepted profiles.- Returns:
- the accepted profiles
-
isAccepted
Return if the given profile is active.- Parameters:
profile
- the profile to test- Returns:
- if the profile is active
-
toString
-