Resource template = ctx.getResource("classpath:some/resource/path/myTemplate.txt"); //这个得到的是ClassPahResource.
Resource template = ctx.getResource("file:///some/resource/path/myTemplate.txt"); //这个得到的是FileSystemResource.
Resource template = ctx.getResource("http://myhost.com/resource/path/myTemplate.txt") //这个得到是:URLResource.
具体的解释参考下图: