org.springframework.boot.config
Class SpringProfileDocumentMatcher
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringProfileDocumentMatcher
public SpringProfileDocumentMatcher()
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.