@Target(value={TYPE,METHOD,PARAMETER,FIELD}) @Retention(value=RUNTIME) @Documented @Qualifier public @interface InjectableResource
Example:
@Inject @InjectableResource(location="myfile.properties") private Properties props; @Inject @InjectableResource(location="config.xml") private InputStream inputStream;This can be used to read files, from classpath or the file system, using two default implementations: ClasspathResourceProvider and FileResourceProvider. They can be extended as well by implementing the InjectableResourceProvider interface to allow reading from alternate sources, if needed (e.g. database LOBs, NoSQL storage areas).
| Modifier and Type | Optional Element and Description |
|---|---|
String |
location |
Class<? extends InjectableResourceProvider> |
resourceProvider |
public abstract Class<? extends InjectableResourceProvider> resourceProvider
public abstract String location
Copyright © 2020 The Apache Software Foundation. All rights reserved.