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 matches if it contains an element "spring.profiles" (a comma-separated list) and one of the profiles is in the active list.
    Author:
    Dave Syer
    • 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 © 2015 Pivotal Software, Inc.. All rights reserved.