org.springframework.boot.yaml

Class SpringProfileDocumentMatcher

  • All Implemented Interfaces:
    org.springframework.beans.factory.config.YamlProcessor.DocumentMatcher


    public class SpringProfileDocumentMatcher
    extends Object
    implements org.springframework.beans.factory.config.YamlProcessor.DocumentMatcher
    YamlProcessor.DocumentMatcher backed by Environment.getActiveProfiles(). A YAML document may define a "spring.profiles" element as a comma-separated list of Spring profile names, optionally negated using the ! character. If both negated and non-negated profiles are specified for a single document, at least one non-negated profile must match and no negated profiles may match.
    Author:
    Dave Syer, Matt Benson, Phillip Webb
    • Constructor Detail

      • SpringProfileDocumentMatcher

        public SpringProfileDocumentMatcher()
      • SpringProfileDocumentMatcher

        public SpringProfileDocumentMatcher(String... profiles)
    • Method Detail

      • addActiveProfiles

        public void addActiveProfiles(String... profiles)
      • matches

        public org.springframework.beans.factory.config.YamlProcessor.MatchStatus matches(Properties properties)
        Specified by:
        matches in interface org.springframework.beans.factory.config.YamlProcessor.DocumentMatcher

Copyright © 2017 Pivotal Software, Inc.. All rights reserved.