Class BeanLevelPropertiesParser
java.lang.Object
org.openspaces.pu.container.support.BeanLevelPropertiesParser
A
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).
- Author:
- kimchy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesloadProperties(org.springframework.core.io.Resource resource) static BeanLevelPropertiesparse(BeanLevelProperties beanLevelProperties, CommandLineParser.Parameter[] params) static BeanLevelPropertiesparse(CommandLineParser.Parameter[] params)
-
Field Details
-
KEY_PROPERTY
- See Also:
-
KEY_PROPERTIES
- See Also:
-
EMBEDDED_PROPERTIES_PREFIX
- See Also:
-
DEFAULT_CONTEXT_PROPERTIES_LOCATION
- See Also:
-
-
Constructor Details
-
BeanLevelPropertiesParser
public BeanLevelPropertiesParser()
-
-
Method Details
-
parse
public static BeanLevelProperties parse(CommandLineParser.Parameter[] params) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
parse
public static BeanLevelProperties parse(BeanLevelProperties beanLevelProperties, CommandLineParser.Parameter[] params) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
loadProperties
public static Properties loadProperties(org.springframework.core.io.Resource resource) throws IOException - Throws:
IOException
-