org.springframework.boot.config
Class SpringProfileDocumentMatcher

java.lang.Object
  extended by org.springframework.boot.config.SpringProfileDocumentMatcher
All Implemented Interfaces:
YamlProcessor.DocumentMatcher

public class SpringProfileDocumentMatcher
extends Object
implements 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 Summary
SpringProfileDocumentMatcher()
           
 
Method Summary
 void addActiveProfiles(String... profiles)
           
 YamlProcessor.MatchStatus matches(Properties properties)
          Test if the given properties match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringProfileDocumentMatcher

public SpringProfileDocumentMatcher()
Method Detail

addActiveProfiles

public void addActiveProfiles(String... profiles)

matches

public YamlProcessor.MatchStatus matches(Properties properties)
Description copied from interface: YamlProcessor.DocumentMatcher
Test if the given properties match.

Specified by:
matches in interface YamlProcessor.DocumentMatcher
Parameters:
properties - the properties to test
Returns:
the status of the match.


Copyright © 2013. All Rights Reserved.