In my Spring 3.0 app, I have some resources in /WEB-INF/dir
. At runtime I need some of them as an InputStream
(or some other type). How can I retrieve them? Is it possible to inject them as a normal Resource
?
Here is an easiest way to do it via annotation:
import org.springframework.core.io.Resource;
@Value("classpath:<path to file>")
private Resource cert;