类 Profiles

java.lang.Object
org.springframework.boot.context.config.Profiles
所有已实现的接口:
Iterable<String>

public class Profiles extends Object implements Iterable<String>
Provides access to environment profiles that have either been set directly on the Environment or will be set based on configuration data property values.
从以下版本开始:
2.4.0
作者:
Phillip Webb, Madhura Bhave
  • 字段详细资料

    • INCLUDE_PROFILES_PROPERTY_NAME

      public static final String INCLUDE_PROFILES_PROPERTY_NAME
      Name of property to set to specify additionally included active profiles.
      另请参阅:
  • 方法详细资料

    • iterator

      public Iterator<String> iterator()
      Return an iterator for all accepted profiles.
      指定者:
      iterator 在接口中 Iterable<String>
    • getActive

      public List<String> getActive()
      Return the active profiles.
      返回:
      the active profiles
    • getDefault

      public List<String> getDefault()
      Return the default profiles.
      返回:
      the active profiles
    • getAccepted

      public List<String> getAccepted()
      Return the accepted profiles.
      返回:
      the accepted profiles
    • isAccepted

      public boolean isAccepted(String profile)
      Return if the given profile is active.
      参数:
      profile - the profile to test
      返回:
      if the profile is active
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object