Spring 3.0 inject files as resources

Here is an easiest way to do it via annotation:

import org.springframework.core.io.Resource;

@Value("classpath:<path to file>")
private Resource cert;

Leave a Comment