public abstract class BeanLevelPropertiesParser extends Object
BeanLevelProperties parser that parses -properties
parameter(s) and transforms it into bean level properties. The format of the command is
-properties [beanName] [properties].
By deafult, will also try and load META-INF/spring/pu.properties and put it in the context level properties.
[beanName] is optional, if not used, the properties will set the BeanLevelProperties.setContextProperties(java.util.Properties).
If used, will inject properties only to the bean registered under the provided beanName within
the Spring context (see BeanLevelProperties.setBeanProperties(String,
java.util.Properties)). The [properties] can either start with embed:// which mean
they will be provided within the command line (for example: embed://propName1=propVal1;propName2=propVal2)
or they can follow Spring Resource lookup based on URL syntax
or Spring extended classpath prefix (see DefaultResourceLoader).
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CONTEXT_PROPERTIES_LOCATION |
static String |
EMBEDDED_PROPERTIES_PREFIX |
static String |
KEY_PROPERTIES |
static String |
KEY_PROPERTY |
| Constructor and Description |
|---|
BeanLevelPropertiesParser() |
| Modifier and Type | Method and Description |
|---|---|
static Properties |
loadProperties(org.springframework.core.io.Resource resource) |
static BeanLevelProperties |
parse(BeanLevelProperties beanLevelProperties,
CommandLineParser.Parameter[] params) |
static BeanLevelProperties |
parse(CommandLineParser.Parameter[] params) |
public static final String KEY_PROPERTY
public static final String KEY_PROPERTIES
public static final String EMBEDDED_PROPERTIES_PREFIX
public static final String DEFAULT_CONTEXT_PROPERTIES_LOCATION
public static BeanLevelProperties parse(CommandLineParser.Parameter[] params) throws IllegalArgumentException
IllegalArgumentExceptionpublic static BeanLevelProperties parse(BeanLevelProperties beanLevelProperties, CommandLineParser.Parameter[] params) throws IllegalArgumentException
IllegalArgumentExceptionpublic static Properties loadProperties(org.springframework.core.io.Resource resource) throws IOException
IOExceptionCopyright © GigaSpaces.