public class FrameworkCommonPropertySource extends Object implements org.springframework.core.Ordered
A holder for common.properties location. This assumes that this is from the current classpath as this drives
the creation of a ClassPathResource. Example:
@Configuration
public class ModuleProperties {
@Bean
public static FrameworkCommonPropertySource blModuleProps() {
return new FrameworkCommonPropertySource("config/bc/module");
}
}
This is used to derive special meaning in the ProfileAwarePropertiesBeanFactoryPostProcessor where they are
added to the active Spring Environment.
Any properties resolved by these classes have a lower precedence than any ProfileAwarePropertySource.
These bean instances are created very early in the Spring lifecycle, during BeanFactoryPostProcessor instantiation. Therefore
you should not be doing any complicated bean logic here (instantating dependencies, trying to @Autowire anything, etc) or
else you might run into unintended consequences. Also note that the registration of this @Bean method is static since
it should follow the same registration rules of a BeanFactoryPostProcessor.
ProfileAwarePropertiesBeanFactoryPostProcessor},
ProfileAwarePropertySource}| Modifier and Type | Field and Description |
|---|---|
static int |
ADMIN_MODULE_ORDER |
static int |
BROADLEAF_COMMON_ORDER
All of the property configurations registered by the core framework (e.g.
|
protected String |
classpathFolder |
static int |
CMS_ORDER |
static int |
DEFAULT_ORDER |
static int |
FRAMEWORK_ORDER |
static int |
FRAMEWORK_WEB_ORDER |
static int |
OPEN_ADMIN_ORDER |
protected int |
order |
static int |
PROFILE_ORDER |
static int |
PROFILE_WEB_ORDER |
| Constructor and Description |
|---|
FrameworkCommonPropertySource(String classpathFolder) |
FrameworkCommonPropertySource(String classpathFolder,
int order) |
| Modifier and Type | Method and Description |
|---|---|
String |
getClasspathFolder() |
int |
getOrder()
Semantics of this ordering are slightly different than others.
|
public static final int BROADLEAF_COMMON_ORDER
public static final int PROFILE_ORDER
public static final int PROFILE_WEB_ORDER
public static final int FRAMEWORK_ORDER
public static final int FRAMEWORK_WEB_ORDER
public static final int OPEN_ADMIN_ORDER
public static final int ADMIN_MODULE_ORDER
public static final int CMS_ORDER
public static final int DEFAULT_ORDER
protected String classpathFolder
protected int order
public FrameworkCommonPropertySource(String classpathFolder)
public FrameworkCommonPropertySource(String classpathFolder, int order)
public String getClasspathFolder()
public int getOrder()
ProfileAwarePropertiesBeanFactoryPostProcessor which means
that it has a higher resolution precedence.getOrder in interface org.springframework.core.OrderedCopyright © 2017. All rights reserved.