Package io.microsphere.spring.boot.env
Class SpringApplicationDefaultPropertiesPostProcessor
- java.lang.Object
-
- io.microsphere.spring.boot.env.SpringApplicationDefaultPropertiesPostProcessor
-
- All Implemented Interfaces:
DefaultPropertiesPostProcessor,org.springframework.core.Ordered
public class SpringApplicationDefaultPropertiesPostProcessor extends java.lang.Object implements DefaultPropertiesPostProcessor
Spring ApplicationDefaultPropertiesPostProcessorto load the properties resources being located in the"classpath*:/META-INF/config/default/*.*"- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
SpringApplication.setDefaultProperties(Properties)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_PROPERTIES_RESOURCES_PATTERNThe resource pattern to load the properties resources.
-
Constructor Summary
Constructors Constructor Description SpringApplicationDefaultPropertiesPostProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitializeResources(java.util.Set<java.lang.String> defaultPropertiesResources)Initializes the default properties resources by adding theDEFAULT_PROPERTIES_RESOURCES_PATTERNwildcard pattern for loading all property source resources from/META-INF/config/default/.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.microsphere.spring.boot.env.DefaultPropertiesPostProcessor
getOrder, postProcess
-
-
-
-
Field Detail
-
DEFAULT_PROPERTIES_RESOURCES_PATTERN
public static final java.lang.String DEFAULT_PROPERTIES_RESOURCES_PATTERN
The resource pattern to load the properties resources.- See Also:
- Constant Field Values
-
-
Method Detail
-
initializeResources
public void initializeResources(java.util.Set<java.lang.String> defaultPropertiesResources)
Initializes the default properties resources by adding theDEFAULT_PROPERTIES_RESOURCES_PATTERNwildcard pattern for loading all property source resources from/META-INF/config/default/.Example Usage
SpringApplicationDefaultPropertiesPostProcessor processor = new SpringApplicationDefaultPropertiesPostProcessor(); Set<String> resources = new LinkedHashSet<>(); processor.initializeResources(resources); // resources now contains "classpath*:/META-INF/config/default/*.*"- Specified by:
initializeResourcesin interfaceDefaultPropertiesPostProcessor- Parameters:
defaultPropertiesResources- the mutable set to add resource patterns to
-
-