Nikos Ballas created CDI-503:
--------------------------------
Summary: Properties injection from files to classes that are valid beans
Key: CDI-503
URL:
https://issues.jboss.org/browse/CDI-503
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Contexts, Packaging and Deployment
Reporter: Nikos Ballas
I would like to be able to provide under META-INF folder my .properties file and have the
the values automatically injected(loaded) into my bean using annotation injection.
DeltaSpike offers something similar but with alot of tricky code.I would like to be able
to do the following:
case 1:
public MyClass{
@PropertiesInjection(file = "/path/to/file")
private Properties properties
}
case 2:
@PropertyPlaceholder(file = "path/to/file")
public MyClass {
@InjectProperty(name="property.name")
private String propertyName
@PropertyPlaceholder(file = "path/to/other/file")
public void someMethod(){
@InjectProperty(name = "other.property")
String propertyName;
endpoint = propertyName+port;
}
}
Again it should be stated that would be nice to be able to apply the @PropertyPlaceholder
annotation either as classlevel annotation and being able to override the value if
it's in method level with different parameters.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)