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?
/WEB-INF/dir
InputStream
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;
1.4m articles
1.4m replys
5 comments
57.0k users